main()
{
unsigned int i=10;
while(i-->=0)
printf("%u ",i);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
10 9 8 7 6 5 4 3 2 1 0 65535 65534…..
Explanation:
Since i is an unsigned integer it can never become negative.
So the expression i-- >=0 will always be true, leading to
an infinite loop.
| Is This Answer Correct ? | 25 Yes | 5 No |
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
void main() { int i=5; printf("%d",i++ + ++i); }
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
Write a program that reads a dynamic array of 40 integers and displays only even integers
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }