Point out the compile time error in the program given below.
#include<stdio.h>
int main()
{
int *x;
*x=100;
return 0;
}
A -
Error: invalid assignment for x
B -
Error: suspicious pointer conversion
C -
No error
D -
None of above
3-
Point out the error in the program
#include<stdio.h>
int main()
{
int a[] = {10, 20, 30, 40, 50};
int j;
for(j=0; j<5; j++)
{
printf("%d\n", a);
a++;
}
return 0;
}
A -
Error: Declaration syntax
B -
Error: Expression syntax
C -
Error: LValue required
D -
Error: Rvalue required
4-
Which of the following statements correctly declare a function that receives a pointer to pointer to a pointer to a float and returns a pointer to a pointer to a pointer to a pointer to a float?
A -
float **fun(float***);
B -
float *fun(float**);
C -
float fun(float***);
D -
float ****fun(float***);
5-
Which of the statements is correct about the program?
#include<stdio.h>
int main()
{
int i=10;
int *j=&i;
return 0;
}
A -
j and i are pointers to an int
B -
i is a pointer to an int and stores address of j
C -
j is a pointer to an int and stores address of i
D -
j is a pointer to a pointer to an int and stores address of i
6-
Which of the statements is correct about the program?