What will be the output-
for(i=1;i<=3;i++)
{
printf("%d",i);
continue;
i++;
}
Answers were Sorted based on User's Feedback
Answer / gourab
the o/p will be 123
bcz after printing 1 for d first time then continue will
take to the for statement.thus i will take value 3.and i++
after d continue statement will never get executed,but it
will not give an error.
| Is This Answer Correct ? | 32 Yes | 2 No |
Answer / chetan
This will not result in a Compiler-error, because "Unreachable-code" is a warning in C, not a compilation error.
The output will be:
123
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / 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 |
It will results in a compile time error, stating that
unreachable code for the second increment statement(i++) after
continue statement.
| Is This Answer Correct ? | 11 Yes | 10 No |
Answer / sakshi arora
The output will be : 123
bcozZ unreachable code is a warning in c , not a compilation error..
| Is This Answer Correct ? | 1 Yes | 0 No |
how to find out the maximum number out of the three inputs.
6 Answers ABC, Apple, C3I, HP, TCS,
write a proram using exceptional handling create a error & display the message "THERE IS AN ERROR?... PLEASE RECTIFY"?
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).
We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character
what is virtual constroctor ? give an exam for it?-(parimal dhimmar)
Write code for the multiplication of COMPLEX numbers?
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).
Deriving time complexity of Binary tree and AVL tree, step by step.
How can I Draw an ellipse in 3d space and color it by using graph3d?
Write a program using two-dimensional arrays that determines the highest and lowest of the 12 input values. Example: Enter 12 numbers: 13 15 20 13 35 40 16 18 20 18 20 14 highest: 40 lowest: 13
Seat Reservation prog for the theatre. Write a function for seat allocation for the movie tickets. Total no of seats available are 200. 20 in each row. Each row is referred by the Character, "A" for the first row and 'J' for the last. And each seat in a row is represented by the no. 1-20. So seat in diffrent rows would be represented as A1,A2....;B1,B2.....;........J1,J2... Each cell in the table represent either 0 or 1. 0 rep would seat is available , 1 would represent seat is reserved. Booking should start from the last row (J) to the first row(A). At the max 20 seats can be booked at a time. if seats are available, then print all the seat nos like "B2" i.e (2 row, 3 col) otherwise Print "Seats are not available." and we must book consecutive seats only.