main()

{

int i=400,j=300;

printf("%d..%d");

}

Answers were Sorted based on User's Feedback



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

Answer / susie

Answer :

400..300

Explanation:

printf takes the values of the first two assignments of the
program. Any number of printf's may be given. All of them
take only the first two values. If more number of
assignments given in the program,then printf will take
garbage values.

Is This Answer Correct ?    2 Yes 2 No

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

Answer / kanth

Answer:
garbage value..garbage value.

explanation: Here we are not giving any variables to print
statement, hence it prints two garbage values.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / gayathri

0..0

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Code Interview Questions

main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error

1 Answers   HCL,


main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024

2 Answers   HCL,


#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }

1 Answers  


What is your nationality?

1 Answers   GoDB Tech,


main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }

1 Answers  






struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); } a. Your Name, Your Address b. Your Address, Your Address c. Your Name Your Name d. None of the above

2 Answers   HCL,


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

2 Answers  


What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }

1 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,


how to test pierrot divisor

0 Answers  


What is the hidden bug with the following statement? assert(val++ != 0);

1 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,


Categories