main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit >> (i - (i -1)));
}
}
a. 512, 256, 0, 0, 0
b. 256, 256, 0, 0, 0
c. 512, 512, 512, 512, 512
d. 256, 256, 256, 256, 256
Answers were Sorted based on User's Feedback
Answer / shanker
Query : When bits cant be changed, then option c is also
correct?
| Is This Answer Correct ? | 3 Yes | 0 No |
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
write a program in c to merge two array
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?
How to access command-line arguments?
void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
How to count a sum, when the numbers are read from stdin and stored into a structure?
Is it possible to type a name in command line without ant quotes?
main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }