main()
{
int i=400,j=300;
printf("%d..%d");
}
Answers were Sorted based on User's Feedback
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 |
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() { { 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
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }
What is your nationality?
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; } }
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
Is the following code legal? struct a { int x; struct a *b; }
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
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)); }
how to test pierrot divisor
What is the hidden bug with the following statement? assert(val++ != 0);
Write a routine that prints out a 2-D array in spiral order