what is the use of using for loop as "for(;;)"?

Answers were Sorted based on User's Feedback



what is the use of using for loop as "for(;;)"?..

Answer / san

Infinite loop

Is This Answer Correct ?    11 Yes 2 No

what is the use of using for loop as "for(;;)"?..

Answer / lalitha

Evaluates the whole loop to be true infinite

Is This Answer Correct ?    8 Yes 1 No

what is the use of using for loop as "for(;;)"?..

Answer / balajisrikanth

for(;;) - is an infinite loop

Is This Answer Correct ?    5 Yes 0 No

what is the use of using for loop as "for(;;)"?..

Answer / piyush

for gating infinite time looping use for(;;),second approach
same as while(true).

Is This Answer Correct ?    4 Yes 0 No

what is the use of using for loop as "for(;;)"?..

Answer / arun n patil

for using first inisilization;second test counter;third
increment/decrement
int i;
syntax: for(i=0;i<=100;i++)

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C++ Code Interview Questions

PROBLEM #8 The cashier at the counter of a Super Store, Mr. Khazaanchi has the following bundles of rupee cash notes with him: Rs. 1, 2, 5, 10, 50, 100, 500, 1000 A customer comes at his counter with various items that he has shopped. Mr. Khazaanchi totals the item prices and tells the customer his total amount payable. The customer gives Mr. Khazanchi some amount of cash. Find the total number of rupee notes of each denomination (i.e. 1, 2, 5, 10, 50, 100, 500, 1000) Mr. Khazaanchi will have to give to the withdrawer ensuring that the total number of rupee notes are minimum.

1 Answers   AR, ARJ,


write a program that can locate elements in array.

1 Answers  


write a program to sort 'n' elemnts using bubble sort

1 Answers   IBM,


Faster Computers Suppose you have a computer that requires 1 minute to solve problem instances of size 1000. What instance sizes can be run in 1 minute if you buy a new computer that runs 1000 times faster than the old one, assuming the following time complexities T(n) for our algorithm? (a) T(n) = O(n). (b) T(n) = O(n3). (c) T(n) = O(10n).

1 Answers   Qatar University,


write a program to convert temperature from fa height into celcius and vise versa,use modular programming

0 Answers   Jomo Kenyatta University,






Write an algorithm that receives a string and reverses it.

2 Answers  


using friend function find the maximum number from given two numbers from two different classes.write all necessary functions and constructor for the classes.

1 Answers   TCS,


. Remove all the blank spaces between character.Matrix is of 10* 10. eg: INPUT ------------------------------------ | N | A | | V | |T ------------------------------------- | |G | U | |P | -------------------------------------- |T | | | A | | ------------------------------------ OUTPUT: ------------------------------------ | N | A | V | T | | ------------------------------------- |G |U | P | | | -------------------------------------- |T | A | | | | ------------------------------------

2 Answers   Nagarro,


Write code for the multiplication of COMPLEX numbers?

0 Answers   IBM,


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

0 Answers  


A research student is given a singly-linked list. Each node of the list has a color, which is either “Black” or “White”. He must find if there are more black nodes than white nodes, or vice versa. His advisor gives him 5,000Rs to buy a computer to do the work. He goes to the computer store and finds a slightly defective computer which costs a mere 3,000Rs. This computer has the small problem of not being able to do arithmetic. This means that he cannot use a counter to count the nodes in the list to determine the majority color. The computer is otherwise fully functional. He has the evil idea that he could buy the defective computer and somehow use it to do his work, so that he can use the rest of the money on enjoyment. Show how he can accomplish this amazing task. Write code for an algorithm called ‘findMajorityColor’ which takes a singly-linked list, L, with n nodes and returns the majority color among nodes of L. This algorithm should have the same asymptotic running time as counting the nodes (O(n)). Note: No arithmetic is allowed.

2 Answers  


1.program to add any two objects using operator overloading 2.program to add any two objects using constructors 3.program to add any two objects using binary operator 4.program to add any two objects using unary operator

2 Answers   IBM,


Categories