What is the output of following program ?

int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}

Answer Posted / vignesh1988i

4 4 1 is the output....

here the operation of STACK involves.... for these kind of statements (ie) statements having multiple values to get printed it is used..... so the very first element that goes inside stack is x , then x<<2 , then x>>2... so from the TOP it will be operated....
and print as the order given in printf statement..... :)

thank u

Is This Answer Correct ?    6 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between far and near in c?

599


Explain Function Pointer?

681


What is pointer and structure in c?

568


How do you determine a file’s attributes?

600


Which is better between malloc and calloc?

669






What are the different properties of variable number of arguments?

661


What is the use of pointers in C?

614


What is getch () for?

674


List some of the static data structures in C?

759


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1599


Explain how can you determine the size of an allocated portion of memory?

622


What is the mean of function?

647


Describe wild pointers in c?

638


How do you list a file’s date and time?

630


How is = symbol different from == symbol in c programming?

610