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


Please Help Members By Posting Answers For Below Questions

the question is that what you have been doing all these periods (one year gap)

1844


Do you know the difference between malloc() and calloc() function?

808


What does != Mean in c?

786


How can I rethow can I return a sequence of random numbers which dont repeat at all?

956


What is the significance of an algorithm to C programming?

785


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

903


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

998


How is actual parameter different from the formal parameter?

785


What is the use of c language in real life?

763


What are the advantages of c preprocessor?

967


What is the difference between array and linked list in c?

853


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

842


What is register variable in c language?

813


Explain what are multibyte characters?

855


"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

870