Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  GATE Computer Science Engineering(CSE) 2025 Mock Test Series  >  Test: Programming & Data Structures - 1 - Computer Science Engineering (CSE) MCQ

Test: Programming & Data Structures - 1 - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Test: Programming & Data Structures - 1

Test: Programming & Data Structures - 1 for Computer Science Engineering (CSE) 2024 is part of GATE Computer Science Engineering(CSE) 2025 Mock Test Series preparation. The Test: Programming & Data Structures - 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Programming & Data Structures - 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Programming & Data Structures - 1 below.
Solutions of Test: Programming & Data Structures - 1 questions in English are available as part of our GATE Computer Science Engineering(CSE) 2025 Mock Test Series for Computer Science Engineering (CSE) & Test: Programming & Data Structures - 1 solutions in Hindi for GATE Computer Science Engineering(CSE) 2025 Mock Test Series course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Programming & Data Structures - 1 | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2025 Mock Test Series for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Programming & Data Structures - 1 - Question 1

Which of the following regex states the character set of FORTRAN?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 1

The basic character set of FORTRAN contains -

  1. Lower case alphabets: a to z
  2. Upper case alphabets: A to Z
  3. Digits: 0 to 9
  4. Underscore: _
Test: Programming & Data Structures - 1 - Question 2

Which file sets the Unix environment for the user when the user logs into his HOME directory?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 2

.exrc: It reads the file and applies the settings in the file being opened.

.profile: It contains your individual profile that overrides the variables set in the /etc/profile file, hence, setting the environment for the user.

.lastlogin: There is no such file.

.mbox: It contains the family of related file formats used for holding collections of email messages.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Programming & Data Structures - 1 - Question 3

Which programming language is called the mother of programming languages?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 3
  • The C language is also known as the mother of all programming languages.
  • C is a general-purpose programming language that is used for creating a variety of applications.
  • C language was originally developed for writing operating systemsUnix Kernel and all of its supporting tools and libraries are written in C language.
  • The C language is used for the following operations :
    • Operating systems
    • Development of new languages
    • Computation platforms
    • Embedded systems
    • Graphics and Games
  • C++ and Java are the high-level languages and COBOL is a compiled English-like computer programming language.
Test: Programming & Data Structures - 1 - Question 4

Which of the following is not a computer language?

I. C++

II. Java

III. Linux

Detailed Solution for Test: Programming & Data Structures - 1 - Question 4


Additional Information

  • Computer Language - A programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks.
  • Operating System - is system software that manages computer hardware and software resources and provides common services for other computer programs.
Test: Programming & Data Structures - 1 - Question 5

Consider the following C declaration

struct {

short s[5];

union {

float y;

long z;

}u;

}t;

Assume that objects of type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment considerations, is

Detailed Solution for Test: Programming & Data Structures - 1 - Question 5

CONCEPT:

Structure in C is a user-defined data type that is used to store the collection of different data types.

The total size of the structure is the sum of the size of every data member.

Union is a user-defined data type that is used to store different data types in the same memory location.

The total size of the union is the size of the largest data member.
 

Given the size of short, float and long is 2 bytes, 4 bytes, and 8 bytes, respectively.

Therefore,

Size of Structure → size of ( short s[5] ) + size of Union  

Here, Size of Union = 8 bytes   { largest data member is long }.

Size of short s[5]  2×5  10 bytes

Size of Structure → 10+8 →18 bytes.

Test: Programming & Data Structures - 1 - Question 6

What is the use of 'javac' command?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 6

Concept

The javac command in Java compiles a program from a command prompt.

It reads a Java source program from a text file and creates a compiled Java class file.

Syntax

javac filename [options]

For example, to compile a program named Abc.java, use this command:

javac Abc.java

Test: Programming & Data Structures - 1 - Question 7

Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 7

Both Merge sort and Insertion sort can be used for linked lists.

The slow random-access performance of a linked list makes other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible.

Since worst case time complexity of Merge Sort is O(nLogn) and Insertion sort is O(n^2), merge sort is preferred.

See following for implementation of merge sort using Linked List.

Test: Programming & Data Structures - 1 - Question 8

Which of the following is true about linked list implementation of stack?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 8

To keep the Last IFirst Out order, a stack can be implemented using linked list in two ways:

a) In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from beginning.

b) In push operation, if new nodes are inserted at the end of linked list, then in pop operation, nodes must be removed from end.

Test: Programming & Data Structures - 1 - Question 9

Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are

Detailed Solution for Test: Programming & Data Structures - 1 - Question 9

Suppose we start filling the queue.

Let the maxQueueSize ( Capacity of the Queue) is 4. So the size of the array which is used to implement this circular queue is 5, which is n.

In the beginning when the queue is empty, FRONT and REAR point to 0 index in the array.

REAR represents insertion at the REAR index.
FRONT represents deletion from the FRONT index.

enqueue("a"); REAR = (REAR+1)%5; ( FRONT = 0, REAR = 1)
enqueue("b"); REAR = (REAR+1)%5; ( FRONT = 0, REAR = 2)
enqueue("c"); REAR = (REAR+1)%5; ( FRONT = 0, REAR = 3)
enqueue("d"); REAR = (REAR+1)%5; ( FRONT = 0, REAR = 4)

Now the queue size is 4 which is equal to the maxQueueSize. 
Hence overflow condition is reached.

Now, we can check for the conditions.

When Queue Full :

(REAR+1)%n = (4+1)%5 = 0

FRONT is also 0.

Hence ( REAR + 1 ) %n is equal to FRONT.

When Queue Empty :

REAR was equal to FRONT when empty ( because in the starting 
before filling the queue FRONT = REAR = 0 )

Hence Option A is correct.

Test: Programming & Data Structures - 1 - Question 10

Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree?

Detailed Solution for Test: Programming & Data Structures - 1 - Question 10

In-order traversal of a BST gives elements in increasing order. So answer c is correct without any doubt.

55 docs|215 tests
Information about Test: Programming & Data Structures - 1 Page
In this test you can find the Exam questions for Test: Programming & Data Structures - 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Programming & Data Structures - 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)