Question 1
i) sizeof(int);
ii) sizeof(int*);
iii) sizeof(int**);
Question 2
char *pChar;
int *pInt;
float *pFloat;
sizeof(pChar);
sizeof(pInt);
sizeof(pFloat);
Question 3
#include \"stdlib.h\"
int main()
{
int *pInt;
int **ppInt1;
int **ppInt2;
pInt = (int*)malloc(sizeof(int));
ppInt1 = (int**)malloc(10*sizeof(int*));
ppInt2 = (int**)malloc(10*sizeof(int*));
free(pInt);
free(ppInt1);
free(*ppInt2);
return 0;
}
Question 4
#include \"stdio.h\"
int main()
{
void *pVoid;
pVoid = (void*)0;
printf(\"%lu\",sizeof(pVoid));
return 0;
}
Question 5
i) int var_9 = 1;
ii) int 9_var = 2;
iii) int _ = 3;
Question 6
Question 7
Question 8
int main()
{
int (*ptr)(int ) = fun;
(*ptr)(3);
return 0;
}
int fun(int n)
{
for(;n > 0; n--)
printf(\"GeeksQuiz \");
return 0;
}
int main()
{
void demo();
void (*fun)();
fun = demo;
(*fun)();
fun();
return 0;
}
void demo()
{
printf(\"GeeksQuiz \");
}
Question 9
/*Program Snippet 1 with for loop*/
for (i = 0; i < 10; i++)
{
/*statement1*/
continue;
/*statement2*/
}
/*Program Snippet 2 with while loop*/
i = 0;
while (i < 10)
{
/*statement1*/
continue;
/*statement2*/
i++;
}
/*Program Snippet 3 with do-while loop*/
i = 0;
do
{
/*statement1*/
continue;
/*statement2*/
i++;
}while (i < 10);
There are 9 questions to complete.