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 |
Derive expression for converting RGB color parameters to HSV values
How we print the table of 3 using for loop in c programing?
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
Is this code legal? int *ptr; ptr = (int *) 0x400;
What is "far" and "near" pointers in "c"...?
main() { printf("%d", out); } int out=100;
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.
main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }
Write a c program to search an element in an array using recursion
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come