GAT Subject :: All Aptitude Test ::

Hassan
1.What will happen if the following C code is executed ?
A. It will cause a compile-time error
B. It will cause a run-time error
C. It will run without any error and prints 3
D. It will cause a compile-time error

2.What is the problem in following variable declaration ?
A. The variable name begins with an integer
B. The special character ‘-‘
C. The special character ‘?’
D. The variable name begins with an integer

3.What will be the output of the following C code ?
A. The program will print 12
B. The program will print 14
C. The program will have a runtime error
D. The program will print 12

4.Which of the following cannot be a variable name in C ?
A. volatile
B. true
C. friend
D. volatile

5.Which of the following is the correct syntax of including a user defined header files in C++ ?
A. #include
B. #include
C. #include “userdefined”
D. #include

6.Which of the following is a correct identifier in C++ ?
A. 7var_name
B. 7VARNAME
C. VAR_1234
D. 7var_name

7.Which of the following is called address operator ?
A. *
B. &
C. _
D. *

8.Which of the following is used for comments in C++ ?
A. // comment
B. /* comment */
C. both // comment or /* comment */
D. // comment

9.What are the actual parameters in C++ ?
A. Parameters with which functions are called
B. Parameters which are used in the definition of a function
C. Variables other than passed parameters in a function
D. Parameters with which functions are called

10.What are the formal parameters in C++ ?
A. Parameters with which functions are called
B. Parameters which are used in the definition of the function
C. Variables other than passed parameters in a function
D. Parameters with which functions are called

11.Which function is used to read a single character from the console in C++ ?
A. cin.get(ch)
B. getline(ch)
C. read(ch)
D. cin.get(ch)

12.Which function is used to write a single character to console in C++ ?
A. cout.put(ch)
B. cout.putline(ch)
C. write(ch)
D. cout.put(ch)

13.What are the escape sequences ?
A. Set of characters that convey special meaning in a program
B. Set of characters that whose use are avoided in C++ programs
C. Set of characters that are used in the name of the main function of the program
D. Set of characters that convey special meaning in a program

14.Which of the following escape sequence represents carriage return ?
A. \r
B. \n
C. \n\r
D. \r

15.Which of the following escape sequence represents tab ?
A. \t
B. \t\r
C. \b
D. \t

16.Who created C++ ?
A. Bjarne Stroustrup
B. Dennis Ritchie
C. Ken Thompson
D. Bjarne Stroustrup

17.Which of the following is called insertion/put to operator ?
A. <<
B. >>
C. >
D. <<

18.Which of the following is called extraction/get from operator ?
A. <<
B. >>
C. >
D. <<

19.A language which has the capability to generate new data types are called ?
A. Extensible
B. Overloaded
C. Encapsulated
D. Extensible

20.Which of the following is a fundamental operation in relational algebra?
A. Set intersection
B. Natural join
C. Assignment
D. Set intersection

21.Which of the following is used to denote the selection operation in relational algebra?
A. Pi (Greek)
B. Sigma (Greek)
C. Lambda (Greek)
D. Pi (Greek)

22.For select operation the ________ appear in the subscript and the ___________ argument appears in the paranthesis after the sigma.
A. Predicates, relation
B. Relation, Predicates
C. Operation, Predicates
D. Predicates, relation

23.The ___________ operation, denoted by −, allows us to find tuples that are in one relation but are not in another.
A. Union
B. Set-difference
C. Difference
D. Union

24.Which is a unary operation?
A. Selection operation
B. Primitive operation
C. Projection operation
D. Selection operation

25.Which is a join condition contains an equality operator?
A. Equijoins
B. Cartesian
C. Natural
D. Equijoins

26.In precedence of set operators, the expression is evaluated from?
A. Left to left
B. Left to right
C. Right to left
D. Left to left

27.Which of the following is not outer join?
A. Left outer join
B. Right outer join
C. Full outer join
D. Left outer join

28.The assignment operator is denoted by?
A. ->
B. <-
C. =
D. ->

29.The total participation by entities is represented in E-R diagram as?
A. Dashed line
B. Double line
C. Double rectangle
D. Dashed line

30.Which of the following indicates the maximum number of entities that can be involved in a relationship?
A. Minimum cardinality
B. Maximum cardinality
C. ERD
D. Minimum cardinality


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers