a=0;
while(a<5)
printf("%d\n",a++);
how many times does the loop occurs?
a.infinite
b.5
c.4
d.6
Answer Posted / vikram
the output will be:
0
1
2
3
4
hence the loop will be executed 5 times,hence the answer is b
Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
What is the use of function in c?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
What are the advantage of c language?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Is it cc or c in a letter?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is difference between main and void main?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
What is structure in c language?
Write a code to remove duplicates in a string.
What is operator promotion?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
Can two or more operators such as and be combined in a single line of program code?
Is multithreading possible in c?
What is the most efficient way to count the number of bits which are set in an integer?