What is the relationship between arrays and pointers in C?
What will be the output?
int arr[3][3] = {{1,2,3}, {4,5,6}, {7,8,9}};
int *p = (int *)arr;
printf("%d", *(p+5));
What does realloc() do?
What is the primary use of const pointer (int * const p)?
Consider: int arr[] = {1,2,3,4,5}; int *p = arr + 2; What is arr - p?
Advertisement
What is malloc(0) likely to return?
What will be printed?
int *p = (int*)malloc(5 * sizeof(int));
int *q = p;
p = NULL;
free(q);
What is the difference between arr and &arr if arr is an array?
int arr[5];
In pointer to function: int (*ptr)(int, int); What does this declare?
What is the output of: printf("%p", NULL);?
For dynamic 2D array: int arr = (int)malloc(n * sizeof(int*)); What's missing?
What is the relationship between arrays and pointers?
Consider: const int *p; and int * const q; Which statement is true?
What is the output of this code?
char str[] = "GATE";
char *p = str;
printf("%c %c", *p, *(p+3));
Which statement is true about nested structures in C?
What happens if you assign a union member and then access another member?
struct u { int a; char b; }; u.a = 257; printf("%d", u.b);
How can you initialize a structure array of 10 elements partially in C?
What is the difference between self-referential and recursive structures?
Given union test { int x; char y[4]; }; If you set y[0]=65, y[1]=66, what happens to x?
Which approach is more memory efficient for storing 100 flags: array of char or bit fields in a structure?