Monday 18 March 2013

register i=5;


    #include<stdio.h>
main()
  {
    register i=5;
    char j[]= "hello";                    
     printf("%s  %d",j,i);
}
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.



Blog Author: Vijay Kumar

Go to: Java Aptitude

No comments:

Post a Comment