← Question papers

TRE1 — General Studies And Computer Science

· Set A

GS: Hindi / English · Language questions stay in their original language.

Instructions

120 questions · 120 marks · 2 hours

Choose one option per question.

Tap an option to check it, or open “See answer”.

Page 3 / 3
← Previous page
Question 101
Which sublayer of the data link layer performs data link functions that depend upon the type of medium?
See answer

Correct answer: (B) Media access control sublayer
The functions that depend on the type of medium—access control and framing—are performed by the media access control (MAC) sublayer.

1 marks · 2023 · Set A
Question 102
Which one of the following is not a network topology?
See answer

Correct answer: (A) Peer-to-peer
Peer-to-peer is a kind of network, not a topology; ring and bus are topologies.

1 marks · 2023 · Set A
Question 103
How do structures and classes in C++ differ?
See answer

Correct answer: (D) More than one of the above
Members of a structure are public by default and those of a class private, yet a structure may still have private members—so more than one statement holds.

1 marks · 2023 · Set A
Question 104
When a mail server sends mail to other mail servers, it becomes
See answer

Correct answer: (A) SMTP client
When a mail server sends mail on to another server, it takes the part of an SMTP client.

1 marks · 2023 · Set A
Question 105
The length of an IPv6 address is
See answer

Correct answer: (E) None of the above
An IPv6 address is 128 bits long, which is not among the options—so the answer is ‘None of the above’.

1 marks · 2023 · Set A
Question 106
What is the use of ios::trunc mode?
See answer

Correct answer: (C) To truncate an existing file to zero
ios::trunc wipes the contents of an existing file and truncates its length to zero.

1 marks · 2023 · Set A
Question 107
Which layer of the TCP/IP stack corresponds to the OSI model transport layer?
See answer

Correct answer: (A) Host-to-host
The host-to-host level of TCP/IP corresponds to the OSI transport layer, and holds TCP and UDP.

1 marks · 2023 · Set A
Question 108
Which of the following statements is/are correct? 1. It is not possible to combine two or more file opening modes in open(). 2. It is possible to combine two or more file opening modes in open(). 3. ios::in and ios::out are input and output file opening modes, respectively.
See answer

Correct answer: (D) More than one of the above
Two or more modes can be combined in open() with |, and ios::in and ios::out are the input and output modes—so more than one statement is correct.

1 marks · 2023 · Set A
Question 109
Which of the following is true with regard to the ping command?
See answer

Correct answer: (C) Ping summarizes packet loss and round-trip delay between two IP endpoints.
Ping sends packets and reports the round-trip time and the packets lost; it does not check connectivity at the port level.

1 marks · 2023 · Set A
Question 110
The correct statement for a function that takes a pointer to a float, a pointer to a pointer to a char, and returns a pointer to a pointer to an integer is
See answer

Correct answer: (C) int **fun(float *, char **)
The function must take a pointer to float and a pointer to a pointer to char, and return a pointer to a pointer to int—so the declaration is int **fun(float *, char **).

1 marks · 2023 · Set A
Question 111
The private key in asymmetric key cryptography is kept by
See answer

Correct answer: (B) Receiver
In asymmetric key cryptography the public key is given out to all, but the receiver keeps the private key secret.

1 marks · 2023 · Set A
Question 112
What will be the output of the following C++ code? #include<iostream> using namespace std; long factorial(long a) { if (a>1) return (a * factorial(a+1)); else return(1); } int main() { long num=3; cout<<num<<"!="<<factorial(num); return 0; }
See answer

Correct answer: (C) Segmentation fault
The code calls factorial(a+1), so the recursion never ends and the stack overflows, giving a segmentation fault.

1 marks · 2023 · Set A
Question 113
Which of the following features must be supported by any programming language to become a pure object-oriented programming language?
See answer

Correct answer: (D) More than one of the above
A pure object-oriented language must support encapsulation, inheritance and polymorphism alike, so more than one option is correct.

1 marks · 2023 · Set A
Question 114
Which is the correct syntax of inheritance?
See answer

Correct answer: (D) More than one of the above
In inheritance the derived class comes first and then the base class with an access specifier; if none is written it is taken as private—so more than one form is correct.

1 marks · 2023 · Set A
Question 115
Which one of the following is the correct definition of the “is_array();” function in C++?
See answer

Correct answer: (A) It checks whether the specified variable is an array.
In C++ is_array() checks whether the given variable is an array. It says nothing about the array's dimensions—there are separate means for that.

1 marks · 2023 · Set A
Question 116
Which of the following statements is correct about a class?
See answer

Correct answer: (A) An object is an instance of its class.
An object is an instance of its class—the class itself is only the blueprint.

1 marks · 2023 · Set A
Question 117
Which of the following can be used to create an abstract class in C++?
See answer

Correct answer: (A) By using a pure virtual function in the class
A class is made abstract in C++ by giving it a pure virtual function.

1 marks · 2023 · Set A
Question 118
Which of the following statements is correct about the C++ programming language?
See answer

Correct answer: (D) More than one of the above
C++ has both static and dynamic type checking, and member functions may be virtual—so more than one statement is correct.

1 marks · 2023 · Set A
Question 119
Which feature of OOP is indicated by the following code? class student{int marks;}; class topper: public student{int age; topper(int age) {this.age=age;}};
See answer

Correct answer: (A) Encapsulation and inheritance
Data and functions are shut up together within the class—that is encapsulation; and topper is derived from student—that is inheritance. Both features appear.

1 marks · 2023 · Set A
Question 120
Which of the following natural elements is the primary element in computer chips?
See answer

Correct answer: (B) Silicon
The primary element in computer chips is silicon, a semiconductor and so fit for making circuits.

1 marks · 2023 · Set A
Page 3 / 3
← Previous page