main()
{
int i =10, j = 20;
clrscr();
printf("%d, %d, ", j-- , --i);
printf("%d, %d ", j++ , ++i);
}
a. 20, 10, 20, 10
b. 20, 9, 20, 10
c. 20, 9, 19, 10
d. 19, 9, 20, 10
Answers were Sorted based on User's Feedback
Answer / ramya
for right increment the value not change.
for the left increment the value change.
so j++=20,--i=9,j++=20,++i=10.
Is This Answer Correct ? | 0 Yes | 1 No |
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }
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() { printf("\nab"); printf("\bsi"); printf("\rha"); }
why the range of an unsigned integer is double almost than the signed integer.
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
Write a single line c expression to delete a,b,c from aabbcc
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }