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 |
write a c program, using for loop, that accepts and odds two numbers. The output must be the sum and the addens. This should be repeated 5 times while the first number is decremented by one and the second number is incremented by 1.
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
write a program that reads a series of strings and prints only those strings begging with letter "b"
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)
write a function -oriented program that generates the Fibonacci, the current numbers of n(as input) and display them (series). In Fibonacci, the current third number is the sum of the previous number.
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.
Here's the programm code: int magic(int a, int b) { return b == 0 ? a : magic(b, a % b); } int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", magic(a, b)); return 0; } on input stream we have integers 4, 45 What's the output integer? How many times will be initiated "magic" function?
A Binary no. is given, we hav to find it's decimal equivalent.
An array of size 5X5 is given to us. The elements from 1 to 25 are to be inserted in the array, such that starting from a particular position for an element i, the next element i+1can be inserted only at the mentioned positions (u,v), and if these all positions are occupied then it returns giving a count of how many positions have been occupied in the array: (u,v) = (x+/-3 , y) (u,v) = (x , y+/-3) (u,v) = (x+/-2 , y+/-2). Example: if the starting element is 1 with the given positions (1,2), then next element 2 can be placed at any one of the positions marked with *. _ _ _ _ _ 1 _ _ _ * _ _ _ _ _ _ _ * _ _ * _ _ _ _
what is the diffrence between ++x , x++ pleaaaaase ???
Given 1 to n random number, find top 10 maximum numbers and explain the time complexity of the algorithm.
write a program using virtual function to find the transposing of a square matrix?