Higher Study | Programming and Data Structure | Programming in C

Which of the following statements is/are incorrect?
Consider the following code.
Consider the following pseudo-code fragment, where a and b are integer variables that have been initialized: /* Pre-conditions : (a > 1 ∧ a < b) */ /* Assume that overflow never occurs */ int x = 0; int p = 1; while (p < b) { p = p * a; x = x + 1; } When the while loop terminates, what will be the value of x in terms of a and b ?
In C, when an array is passed as an argument to a function, which of the following gets passed?
Consider the following C function. void convert (int n) { if (n < 0) printf (“ % d”, n); else { convert(n / 2); printf (“ % d”, n % 2); } } Which one of the following will happen when the function convert is called with any positive integer n as argument?
What does the following program do when the input is unsigned 16-bit integer?
Ads