What will be the output-
for(i=1;i<=3;i++)
{
printf("%d",i);
continue;
i++;
}

Answer Posted / harshit

This will result in compiler error as the code i++; inside
the for loop is not reachable.

If continue statement is enclosed within an if construct
then only the program will compile.

Is This Answer Correct ?    14 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }

802


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

3114


U hv to enter a range from a and b and search hw many no. of times a pattern n. occurs between the range a and b. Eg :i/p:enter range :0 100 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 0 to 100:1 Eg :i/p:enter range :100 1000 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 100 to 1000: (in this 13,113,131,132,133…139,213,313,…913 all these will be counted)

2327


How to Split Strings with Regex in Managed C++ Applications?

3331


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

2240


How can I Draw an ellipse in 3d space and color it by using graph3d?

2341


write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20

3586


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2301


What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }

898


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

2955


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

2467


how to write a program that opens a file and display in reverse order?

2816


1+1/2!+1/3!+...+1/n!

2175


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

5819


A suduco given & u hv 2 check if it is incomplete(blanks left),or correct or incorrect

2638