Home / MCQ Bank / Computer
Computer File Input Output Difficulty: Medium

The . . . . . . . . function reads atmost one less than the number of characters specified by size from the given stream and it is stored in the string str.

Select the correct option to test your answer:

More Computer Questions

In Java generics, what is the purpose of the `? extends T` wildcard? What will be the output of the following code in C++? #include <stdio.h> int ETF(int n) { int a, result = n; for (a = 2; a * a <= n; ++a) { if (n % a == 0) { while (n % a == 0) n = n / a; result = result - result / a; } } if (n > 1) result = result - result / n; return result; } int main() { int n; for (n = 1; n <= 4; n++) printf("%d\n", ETF(n)); return 0; } What does the following piece of code do? for (int i = 0; i < arr.length-1; i++) { for (int j = i+1; j < arr.length; j++) { if( (arr[i].equals(arr[j])) && (i != j) ) { System.out.println(arr[i]); } } } What will be the output of the following Python code? class A: def __init__(self): self._x = 5 class B(A): def display(self): print(self._x) def main(): obj = B() obj.display() main() Determine Output: void main() { static int i=5; if(--i){ main(); printf("%d ", i); } }