81. What is the first argument in command line arguments?
82. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0, j = 1;
int *a[] = {&i, &j};
printf("%d", (*a)[1]);
return 0;
}
#include <stdio.h>
int main()
{
int i = 0, j = 1;
int *a[] = {&i, &j};
printf("%d", (*a)[1]);
return 0;
}
83. Which of the following is the correct syntax to send an array as a parameter to function?
84. Which is true for b, if b is defined as "int *b[10];"?
85. Comment on the output of the following C code.
#include <stdio.h>
int main()
{
int a = 10;
int **c -= &&a;
}
#include <stdio.h>
int main()
{
int a = 10;
int **c -= &&a;
}
86. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int ary[2][3];
ary[][] = {{1, 2, 3}, {4, 5, 6}};
printf("%d\n", ary[1][0]);
}
#include <stdio.h>
int main()
{
int ary[2][3];
ary[][] = {{1, 2, 3}, {4, 5, 6}};
printf("%d\n", ary[1][0]);
}
87. What makes the following declaration denote?
char *str[5];
char *str[5];
88. What will be the output of the following C code?
#include <stdio.h>
void foo(int *ary[]);
int main()
{
int ary[2][3];
foo(ary);
}
void foo(int *ary[])
{
int i = 10, j = 2, k;
ary[0] = &i;
ary[1] = &j;
*ary[0] = 2;
for (k = 0;k < 2; k++)
printf("%d\n", *ary[k]);
}
#include <stdio.h>
void foo(int *ary[]);
int main()
{
int ary[2][3];
foo(ary);
}
void foo(int *ary[])
{
int i = 10, j = 2, k;
ary[0] = &i;
ary[1] = &j;
*ary[0] = 2;
for (k = 0;k < 2; k++)
printf("%d\n", *ary[k]);
}
89. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int *r = &p;
printf("%d", (**r));
}
#include <stdio.h>
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int *r = &p;
printf("%d", (**r));
}
90. What will be the output of the following C code?
#include <stdio.h>
struct student
{
int no;
char name[20];
};
void main()
{
struct student s;
s.no = 8;
printf("hello");
}
#include <stdio.h>
struct student
{
int no;
char name[20];
};
void main()
{
struct student s;
s.no = 8;
printf("hello");
}
Read More Section(Pointer)
Each Section contains maximum 100 MCQs question on Pointer. To get more questions visit other sections.