C Programming :: Pointers - Discussion
Home > C Programming > Pointers > MCQs Questions Discussion
15 / 60
What is the output of the following C Program?
#include<stdio.h>
void main( )
{
void *vp;
char ch = 'g', *cp = "goofy";
int j = 20;
vp = &ch;
printf("%c", *(char *)vp);
vp = &j;
printf("%d",*(int *)vp); vp = cp;
printf("%s",(char *)vp + 3);
}
#include<stdio.h>
void main( )
{
void *vp;
char ch = 'g', *cp = "goofy";
int j = 20;
vp = &ch;
printf("%c", *(char *)vp);
vp = &j;
printf("%d",*(int *)vp); vp = cp;
printf("%s",(char *)vp + 3);
}
Ag20f
Bg20fy
CCompilation Error
Dg20ofy
ENone of these
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!