For function: void modify(int *x) { *x = 20; } If called as modify(&a), what changes?
What is the result of: int x = 5; int *p = &x; int *q = p; if p == q?
In pointer to function: int (*ptr)(int, int); What does this declare?
What happens with: int arr[10]; int *p = arr; *p = 5; printf("%d", arr[0]);?
Which of the following is valid pointer comparison?
Advertisement
In: int *p; *p = 10; What is the issue?
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 the following code?
int x = 10;
int *p = &x;
int q = &p;
printf("%d", q);
Consider the declaration: const int *p; and int * const q;
Which statement is TRUE?
For dynamic 2D array allocation using int arr = (int)malloc(n*sizeof(int*)); what must be done next?
What is the primary issue with this code?
int *p;
*p = 10;
Which of the following is a valid pointer comparison in C?
What will be the output?
int arr[5] = {1,2,3,4,5};
int *p = arr;
p += 2;
printf("%d", *p);
In pointer to function declaration: int (*ptr)(int, int); which statement is correct?
Consider a function void modify(int *x) { *x = 20; } called as modify(&y). What happens?
What is the output of this code?
char str[] = "GATE";
char *p = str;
printf("%c %c", *p, *(p+3));