main()
{
signed int bit=512, mBit;
{
mBit = ~bit;
bit = bit & ~bit ;
printf("%d %d", bit, mBit);
}
}
a. 0, 0
b. 0, 513
c. 512, 0
d. 0, -513
Answers were Sorted based on User's Feedback
Write a single line c expression to delete a,b,c from aabbcc
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
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]); }
C program to print magic square of order n where n > 3 and n is odd
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }
main() { char a[4]="HELLO"; printf("%s",a); }
main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }