#include<stdio.h>

main()

{

register i=5;

char j[]= "hello";

printf("%s %d",j,i);

}

Answers were Sorted based on User's Feedback



#include<stdio.h> main() { register i=5; char j[..

Answer / susie

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.

Is This Answer Correct ?    2 Yes 0 No

#include<stdio.h> main() { register i=5; char j[..

Answer / sandeep

answer


hello 5

printf("%s",j); printf hello because j is a array it also
contain base address of first element of array .


register i treate simple integer

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

Which version do you prefer of the following two, 1) printf(ā€œ%sā€,str); // or the more curt one 2) printf(str);

1 Answers  


why is printf("%d %d %d",i++,--i,i--);

4 Answers   Apple, Cynity, TCS,


main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }

2 Answers   Wipro,


main() { int i=400,j=300; printf("%d..%d"); }

3 Answers  


main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 Answers  






Write a C program to add two numbers before the main function is called.

11 Answers   Infotech, TC,


write a program in c to merge two array

2 Answers  


main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above

2 Answers   HCL,


how to return a multiple value from a function?

5 Answers   Wipro,


union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4

3 Answers   HCL,


What is your nationality?

1 Answers   GoDB Tech,


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

0 Answers   IBM,


Categories