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
Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.
How to swap two ASCII numbers?
write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150
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; }
How to Split Strings with Regex in Managed C++ Applications?
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
A suduco given & u hv 2 check if it is incomplete(blanks left),or correct or incorrect
how to diplay a external image of output on winxp by using c & c++,
Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
output for printf("printf");