In the expression: int arr[5]; int *p = arr; What does p + 2 represent?
What is the purpose of the const keyword in: int * const p;?
Which scenario demonstrates a dangling pointer?
For function: void modify(int *x) { *x = 20; } If called as modify(&a), what changes?
Which of the following is valid pointer comparison?
Advertisement
In: int *p; *p = 10; What is the issue?
For dynamic 2D array allocation using int arr = (int)malloc(n*sizeof(int*)); what must be done next?
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 happens when you initialize a structure variable without assigning values?
Which of the following correctly declares a pointer to a structure?
What is the difference between struct and typedef struct?
What will be printed?
struct s { int a; char b; int c; }; printf("%lu", sizeof(struct s));
How do you access a member of a structure using a pointer?
What is the purpose of padding in structures?
Consider: union u { int x; double y; }; What is sizeof(u)?
Consider struct test { int x; double y; char z; }; What is the minimum size of this structure (assuming 4-byte int, 8-byte double)?
What will be printed by this code? struct s { int a; struct s *next; }; struct s *ptr; sizeof(struct s)