? GTU Engineering 1st Year MCQ | Computer Programming and Utilization-2110003 Winter 2016 Sem-1

MCQ(s) of Computer Programming and Utilization (2110003) - Winter 2016 Sem-1

    • Q. 1  Which one of the following is known as the ‘language of the computer’?
    • (A) Programming language
      (B) High-level language
    • (C) Machine language
      (D) Assembly language
    • (C) Machine language
    • Q. 2  Any C program
    • (A) Must contain at least one function
      (B) Need not contain any function
    • (C) Needs input data
      (D) None of the above
    • (A) Must contain at least one function
    • Q. 3  In flowchart for what purpose "diamond" symbol is used?
    • (A) processing
      (B) condition
    • (C) data flow
      (D) input/output
    • (B) condition
    • Q. 4  Which is a correct ‘C’ expression?
    • (A) z = (x+y);
      (B) z = [x+y];
    • (C) z = {x+y};
      (D) z = {(x+y)};
    • (A) z = (x+y);
    • Q. 5  If we want to increment the value of sum by 1. Which of following should be used?
    • (A) sum++;
      (B) sum = sum+1;
    • (C) sum+ = 1;
      (D) all of above
    • (D) all of above
    • Q. 6  Continue statement
    • (A) Breaks loop and goes to next statement after loop
      (B) does not break loop but starts new iteration
    • (C) exits the program
      (D) Starts from beginning of program
    • (B) does not break loop but starts new iteration
    • Q. 7  Which of following is not a valid assignment expression?
    • (A) y = 22;
      (B) s = x;
    • (C) y % = 6;
      (D) z = 5 = 3;
    • (D) z = 5 = 3;
    • Q. 8  What should be written in the program to get newline on the screen?
    • (A) printf(“\n”);
      (B) echo “\\n”;
    • (C) printf(‘\n’);
      (D) printf(“ \\n “);
    • (A) printf(“\n”);
    • Q. 9  In which of the following the loop is executed at least once?
    • (A) while
      (B) do - while
    • (C) for
      (D) if
    • (B) do - while
    • Q. 10 

      How many times following loop will be executed.

      main()

      {

          int i = 32766;

          while (i<= 32767)

              {

                  printf("%d\n",i);

                  i = i+ 1;

              }

       }

    • (A) 2 times
      (B) 1 times
    • (C) infinite times
      (D) loop will not be executed
    • (A) 2 times
    • Q. 11  File manipulation functions in C are available in which header file?
    • (A) streams.h
      (B) stdio.h
    • (C) stdlib.h
      (D) files.h
    • (B) stdio.h
    • Q. 12  A pointer value refers to
    • (A) A float value
      (B) An integer constant
    • (C) Any valid address in memory
      (D) None
    • (C) Any valid address in memory
    • Q. 13  Structure can contain elements of the same data type.
    • (A) True
      (B) False
    • (A) True
    • Q. 14  Which function reallocates memory?
    • (A) realloc
      (B) calloc
    • (C) malloc
      (D) None of these
    • (A) realloc