Welcome Guest | Sign in | Register
Arrays - Discussion Page For Q.10416 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Arrays > Questions and Answers

Q: What will be output when you will execute following C code?

main()
{
register i=5;
char j[]= "hello";
printf("%s %d",j,i);
}
A. hello 5 B. 5 hello
C. 5 D. hello

Answer and Explanation

Answer:hello 5

Explanation:
If you declare i as register , compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.