MCQOPTIONS
Bookmark
Saved Bookmarks
→
Pointers
→
General
→
Are the three declarations char **apple, char *app...
1.
Are the three declarations char **apple, char *apple[ ], and char apple[ ][ ] same?
A.
True
B.
False
Answer» C.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What will be the output of the program ? #include int *check(static int, static int); int main() { int *c; c = check(10, 20); printf("%d n", c); return 0; } int *check(static int i, static int j) { int *p, *q; p = &i; q = &j; if(i >= 45) return (p); else return (q); }
Which of the following changes can correct the program so that it prints Geeks Quiz ? #include void myStrcat(char *a, char *b) { int m = strlen(a); int n = strlen(b); int i; for (i = 0; i <= n; i++) a[m+i] = b[i]; } int main() { char *str1 = "Geeks "; char *str2 = "Quiz"; myStrcat(str1, str2); printf("%s ", str1); return 0; }
Which of the following declaration throw run-time error?
Comment on the output of this C code? int main() { int a = 10; int **c -= &&a; }
What substitution should be made to //-Ref such that ptr1 points to variable C? int main() { int a = 1, b = 2, c = 3; int *ptr1 = &a; int **sptr = &ptr1; //-Ref }
What is the output of this C code? int main() { int a = 1, b = 2, c = 3; int *ptr1 = &a, *ptr2 = &b, *ptr3 = &c; int **sptr = &ptr1; //-Ref *sptr = ptr2; }
What will be the output of the program assuming that the array begins at the location 1002 and size of an integer is 4 bytes? #include int main() { int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; printf("%u, %u, %u n", a[0]+1, *(a[0]+1), *(*(a+0)+1)); return 0; }
What will be the output of the program ? #include int main() { int i=3, *j, k; j = &i; printf("%d n", i**j*i+*j); return 0; }
What will be the output of the program ? #include int main() { static char *s[] = {"black", "white", "pink", "violet"}; char **ptr[] = {s+3, s+2, s+1, s}, ***p; p = ptr; ++p; printf("%s", **p+1); return 0; }
What will be the output of the program? #include int main() { int arr[2][2][2] = {10, 2, 3, 4, 5, 6, 7, 8}; int *p, *q; p = &arr[1][1][1]; q = (int*) arr; printf("%d, %d n", *p, *q); return 0; }
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies