Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
Pointers
A pointer is
A keyword used to create variables
A variable that stores address of an instruction
A variable that stores address of other variable
All of the above
Correct Answer:
A variable that stores address of other variable
← Previous Question
Next Question→
More Questions from
Pointers
How many bytes are occupied by near, far and huge pointers (DOS)?
What would be the equivalent pointer expression for referring the array element a[i][j][k][l]
What will be the output of the program? #include
int main() { char *str; str = "%d\n"; str++; str++; printf(str-2, 300); return 0; }
What will be the output of the program? #include
int main() { char *str; str = "%s"; printf(str, "K\n"); return 0; }
What will be the output of the program? #include
int main() { char str1[] = "India"; char str2[] = "CURIOUSTAB"; char *s1 = str1, *s2=str2; while(*s1++ = *s2++) printf("%s", str1); printf("\n"); return 0; }
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 assuming that the array begins at location 1002? #include
int main() { int a[2][3][4] = { {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2}, {2, 1, 4, 7, 6, 7, 8, 9, 0, 0, 0, 0} }; printf("%u, %u, %u, %d\n", a, *a, **a, ***a); return 0; }
What will be the output of the program? #include
#include
int main() { int i, n; char *x="Alice"; n = strlen(x); *x = x[n]; for(i=0; i<=n; i++) { printf("%s ", x); x++; } printf("\n", x); return 0; }
What will be the output of the program If the integer is 4bytes long? #include
int main() { int ***r, **q, *p, i=8; p = &i; q = &p; r = &q; printf("%d, %d, %d\n", *p, **q, ***r); return 0; }
What will be the output of the program? #include
int main() { int x=30, *y, *z; y=&x; /* Assume address of x is 500 and integer is 4 byte size */ z=y; *y++=*z++; x++; printf("x=%d, y=%d, z=%d\n", x, y, z); return 0; }
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments