Strings

Q1: Is there any difference between the two statements?
char *ch = "AptitudeCrack";
char ch[] = "AptitudeCrack";

A yes

B No

ANS:A - yes

In first statement the character pointer ch stores the address of the string "AptitudeCrack".
The second statement specifies the space for 7 characters be allocated and that the name of location is ch.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.