VU Midterm Solved Past Papers & Quiz

We will provide Vu midterm solved past papers to prepare for virtual university exams. One of the most useful papers for students to practice and get more marks in final results.

We assume that in a virtual university, if students are looking at the VU midterm solved MCQs and final term past papers then massmcqs.com is the right place for their taste.

Q. The Operator ++ and –- are used to increment and decrement the value of a variable by..

  • 3
  • 2
  • 1
  • 0
1

Q. In the case of single dereferencing the value of the            is the order of        .

  • Pointer, variable
  • Pointer, constant
  • Variable, pointer
  • Constant, pointer
Pointer, Variable

Q. What will be the output of the following code?

int x=10

cout<<”x=”>>x;

  • 10
  • X=10
  • 10=x
  • x=10
x=10

Read More:

VU CS101 introduction to Computer Mcqs

C++ VU Solved Mcqs


Q. Which of the following data type assumed if no data type is specified with constant.??

  • Short
  • Float
  • Int
  • Double
Float

Q. Which programming is good to provide an easy-to-understand and east to use interface , this programming skill is called..??

  • Scalability
  • Usability
  • Reliability
  • Sustainability
Usability

Q. which of the following is the correct syntax to access the value of an array using pointer ptr.??

  • Ptr[0]
  • *ptr[0]
  • Ptr[1]
  • *(ptr+1)
*ptr[0]

Q. —————of the function is also known as the signature of function..?

  • Definition
  • Declaration
  • Calling
  • Invoking
Declaration

Q. if any break statement is missed in switch stamen then..???

  • The compiler will give an error
  • This may cause a logical error
  • No effect on the program
  • None of above
This may cause a logical error

Q. In C / C++

 The default command line argument’s pass to the main function are ..?

  • Float argc, char **argv
  • Float argc, char **argv
  • Float argc, int **argv
  • Float argc, char **argv
Float argc, char **argv

Q. The Microsoft word document (.doc) is the kind of ..?

  • Sequential file
  • Random access file
  • Binary access file
  • Executable file
Random access file
Q. Two dimensional (2D) arrays in C programming with example..??

#include<stdio.h>

int main(){

   /* 2D array declaration*/

   int disp[2][3];

   /*Counter variables for the loop*/

   int i, y;

   for(i=0; i<2; i++) {

      for(y=0;y<3;y++) {

         printf(“Enter value for disp[%d][%d]:”, i, y);

         scanf(“%d”, &disp[i][y]);

      }

   }

   //Displaying array elements

   printf(“Two Dimensional array elements:\n”);

   for(i=0; i<2; i++) {

      for(y=0;y<3;y++) {

         printf(“%d “, disp[i][y]);

         if(y==2){

            printf(“\n”);

         }

      }

   }

   return 0;

}

OutPut:

Enter value for disp[0][0]:1
Enter value for disp[0][1]:2
Enter value for disp[0][2]:3
Enter value for disp[1][0]:4
Enter value for disp[1][1]:5
Enter value for disp[1][2]:6
Two Dimensional array elements:
1 2 3 
4 5 6 

Q. Null character is used to indicate the ——-of the string..??

  • Start
  • End
  • Begin
  • Middle
End

Q. A record id group of related——?

  • Files
  • Bytes
  • Data
  • Field
Data

Q. A 2D array multi [5] [10] can be accessed using the array name as **multi, this technique is called..?

  • Single dereferencing
  • Double dereferencing
  • Double referencing
  • None of above
Double dereferening

Q. _______ are very good tools for code reuse..?

  • Loops
  • Functions
  • Variables
  • Arrays
Functions

Q. C is a / an ———–level language..?

  • Low level
  • Object based
  • Function oriented
  • Object-oriented
Object based

Q. ———– execute all the lines before error and stop all the line which contain the error..?

  • Compiler
  • Linker
  • Interpreter
  • Assembler
Interpreter

Q. when an array element to passed to a function, it is passed by —————-?

  • Reference
  • Data type
  • Value
  • Variable
Value

Q. The purpose of using cout<< is to —————?

  • Display output on the screen
  • Read the data from the keyboard
  • Read the data from the file
  • Write into a file
Display output on the screen

Q. The reminder operator is a ——operator..?

  • Logical
  • Arithmetic
  • Relational
  • Conditional
Arithmatic

Q. which of the following operator is used to access the value of a variable pointed by a pointed..???

  • operator
  • & operator
  • $ operator
  • && operator
& Operator

Q.  Find the Frequency of Characters of a String Object..?

#include <iostream>
using namespace std;
 
int main()
{
    string str = "C++ Programming is awesome";
    char checkCharacter = 'a';
    int count = 0;
 
    for (int i = 0; i < str.size(); i++)
    {
        if (str[i] ==  checkCharacter)
        {
            ++ count;
        }
    }
 
    cout << "Number of " << checkCharacter << " = " << count;
 
    return 0;
}

Output :

Number of a = 2

Leave a Reply

Your email address will not be published. Required fields are marked *