C Programming - Pointers - Discussion
Discussion Forum : Pointers - Find Output of Program (Q.No. 10)
10.
What will be the output of the program ?
#include<stdio.h>
int main()
{
void *vp;
char ch=74, *cp="JACK";
int j=65;
vp=&ch;
printf("%c", *(char*)vp);
vp=&j;
printf("%c", *(int*)vp);
vp=cp;
printf("%s", (char*)vp+2);
return 0;
}
Discussion:
85 comments Page 7 of 9.
Cheran said:
1 decade ago
Thanks Nilesh....Good Job
Aman said:
2 decades ago
Thanks dude.
Gr8 work.
Gr8 work.
Chinni said:
2 decades ago
Thanks a lot... dude.
Chintan said:
1 decade ago
Thank you Nilesh :).
Sai kumar said:
9 years ago
Thank you @Nilesh.
Arvind said:
6 years ago
Thank you @Nitesh.
Ejaz said:
1 decade ago
Thanks nilesh. :).
Ritesh said:
1 decade ago
Thanks nilesh bro.
Yaminikannan said:
2 decades ago
Thank you nilesh.
Aditya said:
1 decade ago
Thanks Nilesh..
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers