Home / MCQ Bank / Computer
Computer Structure And Union Difficulty: Medium

What will be the output of the following C code? #include <stdio.h> typedef struct p { int x, y; }; int main() { p k1 = {1, 2}; printf("%d\n", k1.x); }

Select the correct option to test your answer:

More Computer Questions

What is the output of the following program? #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; } What does the at_beginning_of_day method do for a DateTime object in Ruby? What is a skip list? Choose the advantages of using generics? Which of the following is a valid way to declare a constant string in C#?