Home / MCQ Bank / Computer
Computer File Handling And Input Output In C Sharp Difficulty: Medium

Name the method which returns integer as -1 when the end of file is encountered.

Select the correct option to test your answer:

More Computer Questions

How does Hadoop's Transparent Data Encryption (TDE) enhance security in HDFS? Consider the following dynamic programming implementation of the matrix chain problem: #include<stdio.h> #include<limits.h> int mat_chain_multiplication(int *mat, int n) { int arr[n][n]; int i,k,row,col,len; for(i=1;i<n;i++) arr[i][i] = 0; for(len = 2; len < n; len++) { for(row = 1; row <= n - len + 1; row++) { col = row + len - 1; arr[row][col] = INT_MAX; for(k = row; k <= col - 1; k++) { int tmp = ________________________; if(tmp < arr[row][col]) arr[row][col] = tmp; } } } return arr[1][n - 1]; } int main() { int mat[6] = {20,5,30,10,40}; int ans = mat_chain_multiplication(mat,5); printf("%d",ans); return 0; } Which of the following lines should be inserted to complete the above code? Which of the following is the most powerful type of the computer? How can we move from one desired step to another step? What will be the output of the following C++ code? #include <iostream> using namespace std; class vec { public: vec(float f1, float f2) { x = f1; y = f2; } vec() { } float x; float y; }; vec addvectors(vec v1, vec v2); int main() { vec v1(3, 6); vec v2(2, -2); vec v3 = addvectors(v1, v2); cout << v3.x << ", " << v3.y << endl; } vec addvectors(vec v1, vec v2) { vec result; result.x = v1.x + v2.x; result.y = v1.y + v2.y; return result; };