what is use of for loop?

Answers were Sorted based on User's Feedback



what is use of for loop?..

Answer / geetha

for loop use is more then one calculation or process can be
performed, for example:
for(int i=0;i<5;i++)
{
printf("%d",i);
}
In the above example the printf statement can be excuted in
five times.
Output:0 1 2 3 4

Is This Answer Correct ?    6 Yes 0 No

what is use of for loop?..

Answer / swathi

it is a loop which can have 3 conditions like
1)initiating a value to a variable
2)incrementation/decrementation
3)and a specific condition

Is This Answer Correct ?    3 Yes 0 No

what is use of for loop?..

Answer / kannan.p

for loop use is one are more then printing in printup
statements.

Is This Answer Correct ?    2 Yes 1 No

what is use of for loop?..

Answer / keshav.gadde

for loop is executed as long as condition is true and
process the loop until condition is fail.

Is This Answer Correct ?    1 Yes 0 No

what is use of for loop?..

Answer / raj gunda

for is used to 'finite' number of times repeat the
statements

Is This Answer Correct ?    1 Yes 0 No

what is use of for loop?..

Answer / murugasundari

for loop is used to repeate the process for certain number
of time s known.

Is This Answer Correct ?    2 Yes 2 No

what is use of for loop?..

Answer / gunasekhar

for the repeated eecution of a statement or a block we use
for loop.

Is This Answer Correct ?    0 Yes 0 No

what is use of for loop?..

Answer / madhu

testing the condition more than one time.when it gets true
the loop will be finished.

Is This Answer Correct ?    1 Yes 1 No

what is use of for loop?..

Answer / narendra singh

to execute group of code ,selection of code again and again

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More STL Interview Questions

Give the output of the following program main() {char *p='a'; int *i=100/*p; } what will be the value of *i= 1

6 Answers   Sun Microsystems,


What is stl language?

0 Answers  


what is electronic software

1 Answers  


How the STL's are implemented, What the difference between templates and STL?

1 Answers   Symphony,


what are you now programming Languages C+

1 Answers   HCL,






What is meant by stl in c++?

0 Answers  


Diffrernce Between Overloading and Overriding?

2 Answers   Wipro,


wap in c++ which accept a integer array and its size as argument and replaces element having even values with its half and element having odd values with twice its value

1 Answers  


What is the underlying datastructure of map?

5 Answers   BIA, Siemens,


Define stl.

0 Answers  


what is the acronym of the term 'C.O.M.P.U.T.E.R' ?

17 Answers   Config Systems, Google, Wipro,


Question 1)Read the data from one file and remove all the duplicated words and generate an output file containg only using words.Program should also print number of occurance of each words on standard output.(Program must be use STL and iostream object). Question 2)Write a program to convert the lower case contents of file to upper case using STL. Question 3)What is the output of this problem. int i=12; int &r =i; r+r/4; int +p =&r; int *p = &r; P+=r; return 1; Answer :a)12 b)17 c) 30 d)24 E)15 Question 4) #include #include #include void main() { char srcstr[30],desstr[30]; int i,len; clrscr(); cout<<"\nenter the string\n"; cin>>srcstr; len=strlen(srcstr); for(i=0;srcstr[i]!='\0';i++) { desstr[--len]=srcstr[i]; } desstr[i]='\0'; cout<<"\nreversed string is\n"; for(i=0;desstr[i]!='\0';i++) { cout< } getch(); } Answer : A) string output b)tuptuo gnirts c) string d)output Question 5) Class Test { static const Tk=LEN; int q; public: foo(intx =LEN):q(x){}; TGet Q() const { return q:} void call test Foo<long :9> foo(10); std::const<< foo.Getq(); Answer: 7,8,9,10,11 question 6) class A { int a; char b; }; class B:public A { char b; int a; }; What is the size? Answer a)5 bytes for class A and 5 bytes class B b)4 bytes for class A and 8 bytes class B. c).... d)....

2 Answers   Bally Technologies,


Categories