#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

Write a program to print a square of size 5 by using the character S.

6 Answers   Microsoft,


Derive expression for converting RGB color parameters to HSV values

1 Answers  


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

2 Answers  


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }

1 Answers  






In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }

1 Answers  


create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"

2 Answers  


#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }

2 Answers  


Is the following code legal? struct a { int x; struct a *b; }

2 Answers  


write a program for area of circumference of shapes

0 Answers  


what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }

6 Answers   CSC, IIIT,


void main() { int i=5; printf("%d",i+++++i); }

3 Answers  


Categories