0

Programming in 'C'

Description: 'C'
Number of Questions: 25
Created by:
Tags: -C- Programming Operating System
Attempted 0/25 Correct 0 Score 0

Which of the following data types allows an user to define his own identifier to represent an existing data type in 'C'?

  1. enumeration

  2. int

  3. type def

  4. float


Correct Option: C
Explanation:

This data type allows an user to define his own identifier to represent an existing data type in 'C'.

What is the range of integer data type in ANSI 'C'?

  1. -3.4E38 to +3.4E39

  2. -32768 to +32767

  3. -128 to +127

  4. None of these


Correct Option: B
Explanation:

This is the range of integer data type in 'C' as word length of 16-bit computer is 215, which is equal to 32768.

Which of the following operators are used in 'C' to operate at Bit-level in a program?

  1. Arithmetic operators

  2. Relational operators

  3. Bitwise operators

  4. None of these


Correct Option: C
Explanation:

 These operators are used to perform operations at Bit-level as all data is stored in the computer's memory as a sequence of bits (0's and 1's) .

Which of the following string handling functions in 'C' compares the first n characters of two input strings?

  1. strcmp()

  2. strncmp()

  3. strncpy()

  4. none of these


Correct Option: B
Explanation:

This function in 'C' compares the first n characters of two input strings.

Which of the following memory management techniques allows different pieces of a program to be compiled independently?

  1. Segmentation

  2. Overlay

  3. Paging

  4. None of these


Correct Option: A
Explanation:

This technique allows different pieces of a program to be compiled independently and thus not needed to recompile and relink the whole program after a single revision is made.

Which of the following string handling function in 'C' searches for a specified character in the string?

  1. strlwr()

  2. strupr()

  3. strnchr()

  4. None of these


Correct Option: C
Explanation:

  This function in 'C' searches for a specified character in the string.

Which of the following policies deals with the selection of a page in main memory to be replaced after a page fault occurs and a new page must be brought in?

  1. Fetch policy

  2. Placement policy

  3. Replacement policy

  4. None of these


Correct Option: C
Explanation:

This policy deals with the selection of a page in main memory to be replaced after a page fault occurs and a new page must be brought in.

In a process management, if a process has finished an execution, then it is said to be in _____________ state.

  1. new

  2. blocked

  3. running

  4. termiated


Correct Option: D
Explanation:

 This is the state of a process after completing the execution by the CPU.

Which of the following types of software virtualizations is a full virtualization with dynamic recompilation, which simulates the complete hardware allowing an unmodified OS for a completely different CPU to be run?

  1. Paravirtualization

  2. Emulation

  3. Native virtualization

  4. None of these


Correct Option: B
Explanation:

This type of software virtualization is a full virtualization with dynamic recompilation, which simulates the complete hardware, allowing an unmodified OS for a completely different CPU to be run.

Which of the following characteristics of threads allows the sharing of a lot resources that cannot be shared in a process?

  1. Context switching

  2. Sharing

  3. Security

  4. None of these


Correct Option: B
Explanation:

This property of thread allows the sharing of a lot resources that cannot be shared in process.

Which of the following system programs contains the machine independent part of the operating system?

  1. Kernel

  2. BIOS

  3. Command.com

  4. None of these


Correct Option: A
Explanation:

Kernel is the system program that contains the machine independent part of the operating system.

Which of the following techniques is used in a number of computer systems to reduce the speed mismatch between slow speed I/O devices and fast CPU?

  1. Swapping

  2. Spooling

  3. Shell

  4. None of these


Correct Option: B
Explanation:

Spooling refers to Simultaneous Peripherals Operations Online is a technique used in a number of computer systems to reduce the speed mismatch between slow speed I/O devices and fast CPU.

Which of the following types of errors is generated when undeclared names and type incompatibilities errors are displayed on the screen?

  1. Lexical phase errors

  2. Semantic errors

  3. Syntactic phase errors

  4. None of these


Correct Option: B
Explanation:

This type of errors are generated due to undeclared names and type incompatibilities in the program.

Which of the following assemblers is an open set of technical specifications that any person or company can license and use to develop microprocessors and other semiconductor devices based on published industry standard?

  1. MASM

  2. MASM32

  3. SPARC Assembler

  4. None of these


Correct Option: C
Explanation:

This assembler is an open set of technical specifications that any person or company can license and use to develop microprocessors and other semiconductor devices based on published industry standard.

Which of the following components of computer system defines the ways in which the system resources are used to solve the computing problems of the users?

  1. Hardware

  2. Operating system

  3. Application programs

  4. None of these


Correct Option: C
Explanation:

This component of computer system defines the ways in which the system resources are used to solve the computing problems of the users.

Which of the following registers in Intel x86 family is also called as Base Pointer Register?

  1. AX

  2. BX

  3. DX

  4. BP


Correct Option: D
Explanation:

 This register is also called as Base Pointer Register and in functions, it is used to store parameters or variables on the stack.

Which of the following is the system software that transfers data from offline memory into internal storage?

  1. Relocation

  2. Linker

  3. Loader

  4. None of these


Correct Option: C
Explanation:

 Loader is the system software that transfers data from offline memory into internal storage.

Which of the following memory allocations refers to the process of allocating memory at compile-time before the associated program executed, unlike dynamic memory allocation where memory is allocated as required at run-time?

  1. Stack memory allocation

  2. Static memory allocation

  3. Dynamic memory allocation

  4. None of these


Correct Option: B
Explanation:

Static memory allocation refers to the process of allocating memory at compile-time before the associated program is executed, unlike dynamic memory allocation where memory is allocated as required at run-time.

In which of the following phases of the compiler is the the intermediate code convert into a sequence of machine instructions?

  1. Lexical analysis

  2. Syntax analysis

  3. Code generation

  4. None of these


Correct Option: C
Explanation:

This phase of the compiler converts the intermediate code into a sequence of machine instructions.

Which of the following is the address specified by the programmer using ORIGIN statement?

  1. Linked origin

  2. Translated origin

  3. Load origin

  4. None of these


Correct Option: B
Explanation:

This is the address specified by the programmer, using ORIGIN statement.

In which of the following is a program built from multiple subprograms and the references from one subprogram to another are made by using symbols?

  1. Program loading

  2. Relocation

  3. Symbol resolution

  4. None of these


Correct Option: C
Explanation:

Symbol resolution is a function in which a program is built from multiple subprograms and the references from one subprogram to another are made by using symbols.

Which of the following is defined as the interval from the time of submission of a program to the time of its completion?

  1. Throughput

  2. Turnaround time

  3. Waiting time

  4. None of these


Correct Option: B
Explanation:

Turnaround time is defined as the interval from the time of submission of a program to the time of its completion.

Which of the following is particular kind of unintentional memory consumption by a computer program where the program fails to release memory when no longer needed?

  1. Memory leak

  2. Reference counting

  3. Garbage collection

  4. None of these


Correct Option: A
Explanation:

Memory leak is particular kind of unintentional memory consumption by a computer program where the program fails to release memory when no longer needed

In the process managment, which of the following is a variable that accepts non-negative integer values and except for initialization, it may be accessed and manipulated through two primitive operations - wait and signal?

  1. Mutual exclusion

  2. Semaphores

  3. Deadlocks

  4. None of these


Correct Option: B
Explanation:

Semaphore is a variable, which accepts a non-negative integer value and except for initialization, it may be accessed and manipulated through two primitive operations - wait and signal.

In which of the following states of a process will a running process not use up all of its turn on the CPU before it reaches a point from which it cannot continue without some co-operation from the outside world?

  1. Waiting

  2. Request

  3. Time

  4. None of these


Correct Option: B
Explanation:

In this state of process, a running process will not use up all of its turn on the CPU before it reaches a point from which it cannot continue without some co-operation from the outside world.

- Hide questions