Font size
WorksheetsStrings in C - Part 1
Total questions: 10
Worksheet time: 6mins
Compilation Error
14
13
Garbage Value
321004
3210
01234
400123
432100
Pick all correct statements.
int A[][]={1,2,3,4};
int A[2][]={1,2,3,4};
int A[][2]={1,2,3,4};
int A[2][2]={1,2,3,4};
if two strings are identical then function strcmp() returns
0
-1
true
none of these
str1="6/4";
printf("str1");
6/4
str1
None
What is the main drawback of pointers
Complexity to mange pointers
Difficult to write program
They are not safe
Which of the following pointers leads to memory leaks
Wild Pointers
Dangling Pointers
NULL Pointers
Generic Pionters
What is the output of the following code:
char *p="Welcome to GEC";
printf("%s",p+10);
GEC
to GEC
It prints Memory address
Invalid syntax of printf
In C language Strings are _______________
Mutable
Immutable
Both Mutable and Immutable
No Mutable and immutable concept in C
What is the output of the following code snippet:
char s[]="Ismart Shankar";
printf("%s",3+s+4);
Shankar
t Shankar
Error
art Shankar
