find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
Answer Posted / manishsoni
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
it allocate as this
____ _____
x| |value p | | store &x
| 5 | | 100 |
|____| |_____|
____ _____
|100 |&x | 200 |&p p is pointer //at statement ++*p
|____| |_____|
^ ^
|________________|
and jumpt at 5 bcoz it is prefix for firstof all 5 is
increase then print
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
the question is that what you have been doing all these periods (one year gap)
Do you know the difference between malloc() and calloc() function?
What does != Mean in c?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What is the significance of an algorithm to C programming?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
How is actual parameter different from the formal parameter?
What is the use of c language in real life?
What are the advantages of c preprocessor?
What is the difference between array and linked list in c?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What is register variable in c language?
Explain what are multibyte characters?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks