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


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


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

How to reverse a String without using C functions ?

33 Answers   TCS, Matrix, Wipro,

main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }

1 Answers   Zoho,

enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }

2 Answers  

pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"

2 Answers  

How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!

1 Answers  

C statement to copy a string without using loop and library function..

2 Answers   TCS, Persistent,

main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }

1 Answers   DCE,

what is variable length argument list?

2 Answers  

#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }

1 Answers  

main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  

how can i cast a char type array to an int type array

2 Answers  

What is your nationality?

1 Answers   GoDB Tech,