Join our Telegram Channel

Question

	char *ptr;
	char myString[]="abcdefg";
	ptr=myString
	ptr+=5;
	

The pointer ptr points to which string?

A fg
B efg
C defg
D cdefg
Answer & Explanation
Option: [A]

ptr+=5 means ptr=ptr+5

That means the pointer variable is incremented by 5. Hence it is pointing to the 6th location. i.e. fg

Advertisement

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Advertisement
GkSeries apsc prelims 2023 test series

Today's Top Current Affairs

Current Affairs MCQs

State-wise Current Affairs

General Knowledge

Month-wise Current Affairs 2022

Category-wise Current Affairs

Jobs by Qualification

Free Mock Test