Company: nvidia_7oct
Difficulty: medium
What will be the output of the following C program? int main() { static int i; printf("%d", ++i); return 0; } 0 1 Garbage value Compiler error What is the output of the following C program? main() { char str1[] = "Hello"; char str2[] = "World"; str1 = str2; printf("%s %s", str1, str2); } Hello World World World Compiler error Runtime error If the page size is 4KB and the logical address is 22 bits, how many entries will be in the page table? 512 1K 2K 4K What operation does the following C function perform for positive integers a and b? int MyFunction(int a, int b) { int k = 0; while (a - k*b >= 0) ++k; return a - k*b; } Returns a % b Returns (a % b) - b Returns floor(a/b) Returns a / b What will be the output of the following C program? main() { unsigned int y = 2; int x = -2; if (x > y) printf("X is greater than Y"); else printf("Y is greater than X"); return 0; } X is greater than Y Y is greater than X Compiler error No output What will be the output of the following C program? void