Home / MCQ Bank / Computer
Computer Control Structures

What will be the output of the following C code? #include <stdio.h> int main() { int i = 0, j = 0; while (l1: i < 2) { i++; while (j < 3) { printf("loop\n"); goto l1; } } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • Compilation error

Related Computer Questions

Consider the following dynamic programming implementation of the minimum jumps problem: #include<stdio.h> #include<limits.h> int min_jump(int *arr, int len) { int j, idx, jumps[len]; jumps[len - 1] = 0; for(idx = len - 2; idx >= 0; idx--) { int tmp_min = INT_MAX; for(j = 1; j <= arr[idx] && idx + j < len; j++) { if(jumps[idx + j] + 1 < tmp_min) tmp_min = jumps[idx + j] + 1; } jumps[idx] = tmp_min; } return jumps[0]; } int main() { int arr[] ={1, 1, 1, 1, 1, 1, 1, 1, 1},len = 9; int ans = min_jump(arr,len); printf("%d\n",ans); return 0; } Which of the following "for" loops can be used instead of the inner for loop so that the output doesn't change? You can delete a column family from a table using the method ______ of HBAseAdmin class. Which file is used to specify the packaging cycle? Which of the following function is used for k-means clustering? In Access to reduce the height of the selected control