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


Please Help Members By Posting Answers For Below Questions

What is the use of function in c?

808


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.

4948


What are the advantage of c language?

644


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

868


Is it cc or c in a letter?

661






Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

703


What is difference between main and void main?

709


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?

2273


What is structure in c language?

717


Write a code to remove duplicates in a string.

728


What is operator promotion?

719


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

771


Can two or more operators such as and be combined in a single line of program code?

923


Is multithreading possible in c?

650


What is the most efficient way to count the number of bits which are set in an integer?

673