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

Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)

3 Answers   Nagarro,


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

0 Answers   HCL,


hello friends, given an expression we have to remove the unwanted brackets in that expression. Eg : (a+b) ---> a+b (a+b)*(c)-----> (a+b)*c. Please mail me if you know the logic. My mail id is : saravana6m@gmail.com. Thank you in advance :-)

1 Answers   GrapeCity, Microsoft,


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 prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

0 Answers   Jomo Kenyatta University,


Write a simple encryption program using string function which apply the substitution method.

0 Answers  


Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

0 Answers  


develop a program to calculate and print body mass index for 200 employees

0 Answers   Jomo Kenyatta University,


write a program using virtual function to find the transposing of a square matrix?

0 Answers  


Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 &#8230;

2 Answers   Mind Tree,


what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }

0 Answers  


#include<stdio.h> #include<conio.h> void main() { char str[10]; int,a,x,sw=0; clrscr(); printf("Enter a string:"); gets(str); for(x=0;x<=a;a++); for(x=0;x<=a;x++) { if(str[x]==str[a-1-x]) { sw=1; } else sw=0; } if(sw==10 printf("The entered string is palindrome:"); else printf("The entered string is not a palindrome:); } getch(); } wht would be the explanation with this written code???

2 Answers  


Categories