MCQOPTIONS
Saved Bookmarks
This section includes 1917 Mcqs, each offering curated multiple-choice questions to sharpen your UGC-NET knowledge and support exam preparation. Choose a topic below to get started.
| 501. |
Identify the incorrect statement : |
| A. | ATM provides both real time and non-real time service |
| B. | ATM provides faster packet switching than X.25 |
| C. | ATM was developed as part of the work on broadband ISDN |
| D. | ATM does not have application in non-ISDN environments where very high data rates are required |
| Answer» E. | |
| 502. |
Mobile IP provides two basic functions. |
| A. | Route discovery and registration |
| B. | Agent discovery and registration |
| C. | IP binding and registration |
| D. | None of the above |
| Answer» C. IP binding and registration | |
| 503. |
A ............... can forward or block packets based on the information in the network layer and transport layer header. |
| A. | Proxy firewall |
| B. | Firewall |
| C. | Packet filter firewall |
| D. | Message digest firewall |
| Answer» B. Firewall | |
| 504. |
How many constructors can a class have ? |
| A. | zero |
| B. | 1 |
| C. | 2 |
| D. | any number |
| Answer» E. | |
| 505. |
Enumeration variables can be used in: |
| A. | search statement like an integer variable |
| B. | break statement |
| C. | preprocessor commands |
| D. | function statement |
| Answer» B. break statement | |
| 506. |
A static member function can have access to: |
| A. | Static functions in the same class |
| B. | Static members in the class |
| C. | Static members of other classes |
| D. | Public functions of the same class |
| Answer» C. Static members of other classes | |
| 507. |
In case of right shift bitwise operator in ‘C’ language, after shifting n bits, the left most n bits: |
| A. | are always filled with zeroes |
| B. | are always filled with ones |
| C. | are filled with zeroes or ones and is machine dependent |
| D. | none of the above |
| Answer» D. none of the above | |
| 508. |
Which of the following is not correct (in C++)? |
| A. | Class templates and function templates are instantiated in the same way. |
| B. | Class templates differ from function templates in the way they are initiated. |
| C. | Class template is initiated by defining an object using the template argument. |
| D. | Class templates are generally used for storage classes. |
| Answer» C. Class template is initiated by defining an object using the template argument. | |
| 509. |
What is the effect of the following C code?for(int i=1; i≤5; i=i+½)printf(“%d,”,i); |
| A. | It prints 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, and stops |
| B. | It prints 1, 2, 3, 4, 5, and stops |
| C. | It prints 1, 2, 3, 4, 5, and repeats forever |
| D. | It prints 1, 1, 1, 1, 1, and repeats forever |
| Answer» E. | |
| 510. |
Polymorphism means: |
| A. | A template function |
| B. | Runtime type identification within a class hierarchy |
| C. | Another name for operator overloading |
| D. | Virtual inheritance |
| Answer» C. Another name for operator overloading | |
| 511. |
If a data-item is declared as a protected access specifier then it can be accessed: |
| A. | Anywhere in the program |
| B. | By the base and derived classes |
| C. | Only by base class |
| D. | Only by derived class |
| Answer» C. Only by base class | |
| 512. |
Consider the following declaration in C:char a[];char *p;Which of the following statement is not a valid statement? |
| A. | p=a; |
| B. | p=a+2; |
| C. | a=p; |
| D. | p=&a[2]; |
| Answer» D. p=&a[2]; | |
| 513. |
Consider the following C code:{ int a=5, b=9;float r;r=b/a; }What is the value of r ? |
| A. | 1.8 |
| B. | 1.0 |
| C. | 2.0 |
| D. | 0.0 |
| Answer» C. 2.0 | |
| 514. |
Data members and member function of a class by default is respectively: |
| A. | private and public |
| B. | public |
| C. | public and private |
| D. | private |
| Answer» E. | |
| 515. |
What will be the value of i for the following expression:int f = 11, i = 3;i+ = (f >3)?i & 2:5; |
| A. | 2 |
| B. | 5 |
| C. | 13 |
| D. | 12 |
| Answer» C. 13 | |
| 516. |
Conversion from one data type to another data type, inserted automatically by a programming language. |
| A. | Polymorphism |
| B. | Coercion |
| C. | Auto Binding |
| D. | Dynamic Binding |
| Answer» C. Auto Binding | |
| 517. |
A static variable is one: |
| A. | Which cannot be initialized |
| B. | Which is initialized once at the commencement of execution and cannot be changed at runtime |
| C. | Which retains its value throughout the life of the program |
| D. | Which is the same as an automatic variable but is placed at the head of a program |
| Answer» D. Which is the same as an automatic variable but is placed at the head of a program | |
| 518. |
A ternary operator in C++ |
| A. | ?: |
| B. | || |
| C. | :: |
| D. | .* |
| Answer» B. || | |
| 519. |
What cannot replace ‘?’ in the following C code to print all odd numbers less than 100?for(i=1;?;i+2)printf(“%d\n”,i); |
| A. | i≤100 |
| B. | i≤101 |
| C. | i<100 |
| D. | i<101 |
| Answer» C. i<100 | |
| 520. |
When one-dimensional character array of unspecified length is assigned an initial value: |
| A. | an arbitrary character is automatically added to the end of the string |
| B. | ‘o’ is added to the end of the string |
| C. | length of the string is added to the end of the string |
| D. | ‘end’ is added to the end of the string |
| Answer» C. length of the string is added to the end of the string | |
| 521. |
A type of inheritance in which the property of one class is inherited by more than one class. |
| A. | Hybrid Inheritance |
| B. | Hierarchical Inheritance |
| C. | Multilevel Inheritance |
| D. | Multiple Inheritance |
| Answer» C. Multilevel Inheritance | |
| 522. |
What is the output of the following program segment ?main(){int count, digit=0;count=1;while(digit |
| A. | 10 |
| B. | 9 |
| C. | 12 |
| D. | 11 |
| Answer» E. | |
| 523. |
Which of the following correctly describes overloading of functions ? |
| A. | Virtual polymorphism |
| B. | Transient polymorphism |
| C. | Ad-hoc polymorphism |
| D. | Pseudo polymorphism |
| Answer» D. Pseudo polymorphism | |
| 524. |
The declaration “unsigned u” indicates: |
| A. | u is an unsigned character |
| B. | u is an unsigned integer |
| C. | u is a character |
| D. | u is a string |
| Answer» C. u is a character | |
| 525. |
Function overloading is a concept in which: |
| A. | a function is used to implement lots of tasks at the same time. |
| B. | a function is called too many number of times by another function. |
| C. | a function provides common interface to the user to carry out possibly different functions in each call. |
| D. | a function is computationally too expensive for the system to handle. |
| Answer» D. a function is computationally too expensive for the system to handle. | |
| 526. |
Which of the following is not correct for virtual function in C++? |
| A. | Must be declared in public section of class. |
| B. | Virtual function can be static. |
| C. | Virtual function should be accessed using pointers. |
| D. | Virtual function is defined in base class. |
| Answer» C. Virtual function should be accessed using pointers. | |
| 527. |
'ptrdata' is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++): |
| A. | *(ptrdata++) |
| B. | (*ptrdata++) |
| C. | *(ptrdata)++ |
| D. | Depends on compiler |
| Answer» B. (*ptrdata++) | |
| 528. |
What is the output of the following ‘C’ program?main(){printf(“%x”,-1>>4);} |
| A. | ffff |
| B. | 0fff |
| C. | 0000 |
| D. | fff0 |
| Answer» B. 0fff | |
| 529. |
The function sprint() works like printf(), but operates on: |
| A. | Data in a file |
| B. | stdrr |
| C. | stdin |
| D. | string |
| Answer» E. | |
| 530. |
When a function is recursively called, all automatic variables: |
| A. | are initialized during each execution of the function |
| B. | are retained from the last execution |
| C. | are maintained in a stack |
| D. | are ignored |
| Answer» B. are retained from the last execution | |
| 531. |
Which of the following is not true in C++ ? |
| A. | “Private” elements of a base class are not accessible by members of its derived class. |
| B. | “Protected” elements of base class are not accessible by members of its derived class. |
| C. | When base class access specified is “Public”, public elements of the base class become public members of its derived class. |
| D. | When base class access specified is “Public”, protected elements of a base class become protected members of its derived class. |
| Answer» C. When base class access specified is “Public”, public elements of the base class become public members of its derived class. | |
| 532. |
Runtime polymorphism can be achieved by: |
| A. | Accessing virtual function through the pointer of the base class |
| B. | Accessing virtual function through the object |
| C. | The derived class |
| D. | None of these |
| Answer» B. Accessing virtual function through the object | |
| 533. |
Which one of the following is correct for overloaded functions in C++? |
| A. | Compiler sets up a separate function for every definition of function |
| B. | Compiler does not set up a separate function for every definition of function |
| C. | Overloaded functions cannot handle different types of objects |
| D. | Overloaded functions cannot have same number of arguments |
| Answer» B. Compiler does not set up a separate function for every definition of function | |
| 534. |
Which of the following storage classes have global visibility in C/C++? |
| A. | Auto |
| B. | Extern |
| C. | Static |
| D. | Register |
| Answer» C. Static | |
| 535. |
The following statement in 'C'int (*f())[];declares |
| A. | a function returning a pointer to an array of integers |
| B. | a function returning an array of pointers to integers |
| C. | array of functions returning pointer to integers |
| D. | an illegal statement |
| Answer» B. a function returning an array of pointers to integers | |
| 536. |
Which one of the following is correct, when a class grants friend status to another class? |
| A. | The member functions of the class generating friendship can access the members of the friend class |
| B. | All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship |
| C. | Class friendship is reciprocal to each other |
| D. | There is no such concept |
| Answer» C. Class friendship is reciprocal to each other | |
| 537. |
Which of the following cannot be passed to a function in C++? |
| A. | Constant |
| B. | Structure |
| C. | Array |
| D. | Header file |
| Answer» E. | |
| 538. |
Match the following with respect to the jump statements List-I List-IIa. fopen() i. returns end of fileb. fclose() ii. return for any problem reportc. ferror() iii. returns 0d. feof() iv. returns a file pointerCodes:a b c d |
| A. | iv i ii iii |
| B. | iii i iv ii |
| C. | ii iii iv i |
| D. | iv iii i ii |
| Answer» B. iii i iv ii | |
| 539. |
What is the value returned by the function f given below when n=100 ? int f (int n) { if (n==0) then return n; else return n + f(n-2); } |
| A. | 2550 |
| B. | 2556 |
| C. | 5220 |
| D. | 5520 |
| Answer» B. 2556 | |
| 540. |
In C++, the operator which cannot be overloaded. |
| A. | Bitwise & operator |
| B. | Assignment operator |
| C. | |
| D. | :: operator |
| Answer» E. | |
| 541. |
Match the following with respect to the jump statements List-I List-IIa. return i. The conditional test and increment portionsb. goto ii. A value associated with itc. break iii. Requires a label ford. continue iv. An exit from only the innermostCodes:a b c d |
| A. | ii iii iv i |
| B. | iii iv i ii |
| C. | iv iii ii i |
| D. | iv iii i ii |
| Answer» B. iii iv i ii | |
| 542. |
The following loop in ‘C’:int i=0;While(i++ |
| A. | will terminate |
| B. | will go into an infinite loop |
| C. | will give compilation error |
| D. | will never be executed |
| Answer» C. will give compilation error | |
| 543. |
The bitwise OR of 35 with 7 in C will be: |
| A. | 35 |
| B. | 7 |
| C. | 42 |
| D. | 39 |
| Answer» E. | |
| 544. |
A function object: |
| A. | is an instance of a class for which operator () is a member function |
| B. | is an instance of a class for which operator → is a member function |
| C. | is a pointer to any function |
| D. | is a member function of a class |
| Answer» B. is an instance of a class for which operator → is a member function | |
| 545. |
#define max(x,y) x=(x>y)?x:y is a macro definition, which can find the maximum of two numbers x and y if: |
| A. | x and y are both integers only |
| B. | x and y are both declared as float only |
| C. | x and y are both declared as double only |
| D. | x and y are both integers, float or double |
| Answer» E. | |
| 546. |
The associativity of which of the following operators is Left to Right, in C++? |
| A. | Unary Operator |
| B. | Logical not |
| C. | Array element access |
| D. | Depends on compiler |
| Answer» D. Depends on compiler | |
| 547. |
What is the value of the arithmetic expression (Written in C)2*3/4-3/4* 2 |
| A. | 0 |
| B. | 1 |
| C. | 1.5 |
| D. | None of the above |
| Answer» C. 1.5 | |
| 548. |
Which of the following is true of constructor function in C++ ? |
| A. | A class must have at least one constructor. |
| B. | A constructor is a unique function which cannot be overloaded. |
| C. | A constructor function must be invoked with the object name. |
| D. | A constructor function is automatically invoked when an object is created. |
| Answer» E. | |
| 549. |
If a function is friend of a class, which one of the following is wrong ? |
| A. | A function can only be declared a friend by a class itself. |
| B. | Friend functions are not members of a class, they are associated with it. |
| C. | Friend functions are members of a class. |
| D. | It can have access to all members of the class, even private ones. |
| Answer» D. It can have access to all members of the class, even private ones. | |
| 550. |
In C++, polymorphism requires: |
| A. | Inheritance only |
| B. | Virtual functions only |
| C. | References only |
| D. | Inheritance, Virtual functions and references |
| Answer» E. | |