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

Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.

Select the correct option to test your answer:

More Computer Questions

What is the time complexity of the following iterative code used to find the smallest and largest element in a linked list? #include<stdio.h> #include<stdlib.h> struct Node { int val; struct Node* next; }*head; int get_max() { struct Node* temp = head->next; int max_num = temp->val; while(temp != 0) { if(temp->val > max_num) max_num = temp->val; temp = temp->next; } return max_num; } int get_min() { struct Node* temp = head->next; int min_num = temp->val; while(temp != 0) { if(temp->val < min_num) min_num = temp->val; temp = temp->next; } return min_num; } int main() { int i, n = 9, arr[9] ={8,3,3,4,5,2,5,6,7}; struct Node *temp, *newNode; head = (struct Node*)malloc(sizeof(struct Node)); head -> next =0; temp = head; for(i=0;i<n;i++) { newNode =(struct Node*)malloc(sizeof(struct Node)); newNode->next = 0; newNode->val = arr[i]; temp->next =newNode; temp = temp->next; } int max_num = get_max(); int min_num = get_min(); printf("%d %d",max_num,min_num); return 0; } What will be the output of the following C++ code? #include <iostream> #include <exception> using namespace std; void myunexpected () { cout << "unexpected handler called\n"; throw; } void myfunction () throw (int,bad_exception) { throw 'x'; } int main (void) { set_unexpected (myunexpected); try { myfunction(); } catch (int) { cout << "caught int\n"; } catch (bad_exception be) { cout << "caught bad_exception\n"; } catch (...) { cout << "caught other exception \n"; } return 0; } In Hadoop, what is the purpose of a NameNode? Given a pattern of length-5 window, find the suitable modulo value. 4 3 2 5 0 Which of the following must be used with the mouse when you want to resize an image from the center and keep it proportioned?