UGC NET STUDY MATERIALS

C++ SAMPLE PAPER

===========================================
Model Question Paper

Subject Code: MC0066

Subject Name: OOPs using C++

Credits: 4 Marks: 140
==========================================
Part A (One mark questions)

1. _______________ is an OOP Language.

A. Basic

B. Fortan

C. C++

D. Cobol

2. ---------------- allows you to create a derived class that inherits properties from more than one

base class.

A) Multilevel inheritance

B) Multiple inheritance

C)Hybrid Inheritance

D) Hierarchical Inheritance

3. _______________ feature in OOP allows to reuse code

A) Polymorphism

B) Inheritance

C) Encapsulation

D) Data hiding

4. A class that declares or inherits a virtual function is called -------------------

A) Encapsulation class

B)inherited class

C) polymorphic class

D) static class

5. C++ header file that handles input output functions is ____________

A) iostream.h

B) iomanip.h

C) string.h

D) fstream.h

6. -------------- are bound dynamically at run time.

A) static class

B) virtual function

C) friend function

D) inline function

7. ---------- pointers are not modifiable.

A) that

B) this

C) Indirection

D) Address

8. ---------------- classes are used in cases where one class is tightly coupled to another

class

A) Abstract

B) friend

C) static

D) virtual

9. The extension of C++ source file is _______________

A) .txt

B) .doc

C) .c

D) .cpp

10. The ------------------ keyword/s do not apply to friend functions, as the class has no control

over the scope of friends.

A) public

B) protected

C) private

D) both A) and B)

11. The extension of C++ object code is __________________
A) .obj

B) .cpp

C) .ppt

D) .xls

12. --------------- do not break encapsulation, but rather enhance a class interface.

A) Static functions

B)Friend functions

C) Dynamic functions

D) none of these

13. The function-------------- will return the last read character and will move the inside pointer,

one with -1 char.

A) putback()

B) flush()

C) peek()

D) getline()



14.--------------is an identifier that can be inserted into an output stream or extracted from

an input stream in order to produce a desired effect.

A)Stream

B) Manipulator

C) this

D) Flag

15. The error occuring due to missing semicolon is __________________

A) Syntax

B) Logical

C) Linker

D) Runtime

16. Identify the modulators from the following list.

i. endl ii. hex iii. auto iv. Default

A) i only

B) ii only

C) both i and ii

D) all of these

17. Which of these manipulator is used to insert null character in a string.

A) endl

B) ends

C) unitbuf

D) setfill

18. Which of these file open mode you use to delete all previous content in the file.

A) ios :: ate

B) ios ::in

C) ios:: app

D) ios::trunc

19. A class generated from a class template is called --------------------

A) Inherited class

B) generated class.

C) derived class

D) base class

20. The size of an int variable in C++ is _____________bytes

A) 4.

B) 2

C) 1

D) 8

21. -------------- is very useful when templates of template come into usage.

A) friend function

B) static function

C) typedef

D) inheritance

22. Which of these c++ feature allow you to create classes that are dynamic in terms of the

types of data they can handle.

A) Inheritance

B) Templates

C) Polymorphism

D) information hiding

23. Create the required classes by plugging in the actual type for the type parameters, this

process is commonly known as ------------------------

A) Instantiating a class.

B) encapsulation of class

C) booting of class

D) none of these

24. What are the two basic models in the exception handling theory.

A) caught and uncaught

B) termination and resumption

C) try and block
D) none of these

25. Which of these is/are the exception classes derived from logic_error

i) domain_error ii) out_of_range iii) bad_cast iv) bad_alloc

A) i),ii),iii) only

B) iv) only

C) i) and iv) only

D) iii) only

26. Each catch clause (exception handler) is like a little function that takes a ----------------

argument/s of one particular type.

A) many

B) two

C) single

D) either A) or B)

27. The size of an double variable in C++ is ________________ bytes

A) 10

B) 2

C) 4

D) 8

28. The exception specification is like a----------------, It tells the user to write exception

handling code and what exceptions to handle.

A) library file

B) function prototype

C) header file

D) built-in function

29. Which of these exception reports a failure to allocate storage.

A) bad_cast

B) bad_typeid

C) length_error

D) none of these

30. Stack is an example for ---------------- structure.

A) LIFO

B) FIFO

C) SISO

D) LILO
31. The standard sequence containers include --------------

i) vector ii) deque iii)list iv) stack

A) i) and ii) only

B) i),ii) and iii)

C) iii) and iv) only

D) i),ii),iii) and iv)

32. STL stands for --------------

A) standard template library

B) standard template link

C) stack template link

D) single temporary list

33. Iterators which can move freely any number of steps in one operation are called -------------

A) input iterators

B) forward iterators

C) random access iterators

D) output iterators
34. There are ------------- types of sequence containers in the STL.

A) two

B) four

C) eight

D) three

35. To destroy element at the end of vector which of these vector access function

is used.

A)pop_back()

B) push_back()

C) insert()

D) destroy()

36. --------------- diagram shows the change of an object through time.

A) Activity

B) State

C)Collaboration

D)Use case

37. Which of these link is used to avoid repetition of scenarios in multiple use cases.

A) Include

B) Generalization

C) Extends

D) None of these

38. Models in UML consist of ---------------- that interact by sending each other, messages.

A) Actor

B) objects

C) use case

D) none of these

39. Which one of the following symbols is used for indicating comments?

A) >>

B) <<

C) //

D)**

40. Use case diagrams are helpful in which of these areas.

A) determining failure

B) communicating with clients

C) generating test cases

D) all of these

Part B (Two mark questions)

41. ------------------- is a master function required in all C++ program and execution begins from

the first statement of this function.

A) Virtual function

B) main()

C) inline()

D) getch()

42. ----------------- is the ability of objects belonging to different types to respond to method calls

of methods of the same name, each one according to an appropriate type-specific behavior.

A) Inheritance

B) Virtuality

C) polymorphism

D) None of these.

43. State true or false

1. Inheritance is implemented in C++ through the mechanism of derivation.

2. Multiple inheritance allows you to create a derived class that inherits properties from

more than one base class.

A) true, true

B) true, false

C) false , true

D) false , false

44. State true or false

1. Polymorphic functions are functions that cannot be applied to objects of more than one
type.

2. Overloaded functions are statically bound at run time.

A) false, true

B) false, false

C) true , true

D) true, false

45. -------------- statement takes the control out of the loop.

A) break

B) const

C) continue

D) auto

46. The --------- and ------------------- keywords do not apply to friend functions, as the class has

no control over the scope of friends.

A) public, protected

B) Private, public

C) protected , private

D) private , protected

47. -------------- library function can be used to copy the contents of one string to another string.

A) strcp()

B)strcmp()

C) strcpy()

D) stringcopy()

48. The current reading position, which is the index of the next byte that will be read from

the file is called -----------------------.

A) set pointer

B) curr pointer

C) put pointer

D ) get pointer

49. Which of these function returns the ASCII code of the char, but not the char itself

A) peek()

B) asc()

C) tellg()

D) seekp()

50. To perform identical operations for each type of data compactly and conveniently, we use -------------

A)Inline function

B) function templates.

C) this pointer

D) friend function

51. A static data member generated from a static data member template is called -------static data member

A) inherited

B) base

C) generated

D) derived

52. State true or false

i. You can partially specialize class templates for certain types.

ii. You cannot overload function templates.

A) true, false

B) false, true

C) true, true

D) false, false

53. Default values for the arguments have to be specified during ----------------

A) Initialization

B) Declaration

C) instantiation

D) end of the program

54. Exceptions should not be used for---------------

A) asynchronous events

B) ordinary error condition

C ) flow of control

D) all of the above

55. State true or false

i. C++ provides syntax to allow you to politely tell the user what exceptions this

function throws, so the user may handle them.

ii. To use set_unexpected(), you must include the header file .

A) true , false

B) false, false

C) true, true

D) false, true

56. Which of this is standard associative containers ?

A) vector

B) set

C) deque

D) list

57. The advantage of passing by reference is-------------------------------

A) returning multiple value

B) modifying original values

C) Both A )and B)

D) Neither A) nor B)

58. The operator [] allows you to access a single character in a string, but without any

bounds checking , if you want bounds checking which of these function do you use .

A) at()

B) ioc()

C) st()

D) ooc()

59. Member functions of a class can be defined outside the class using ---------- operator

along with the class name.

A) **

B) &&

C) ::

D) ->

60. Sate true or false

i) Function enable to reuse code.

ii) In if else statement , at any point of time statements in both the if and else part may

be executed.

A) true ,false

B) true , true

C) false , false

D) false, true


Part C (Four mark questions)

61. Write the output of the following C++ code

# include

void main()

{ int x=1;

switch (x)

{

case 0 : cout<<”zero”;

break;

case 1: cout <<“one”;

case 2: cout<

}

}

A) zero

B) one

C) onetwo

D) syntax error

62. What is the output of the following program.

#include

using namespace std;

class Base {

public:

char* name;

void display() {

cout << name << endl;

}

};

class Derived: public Base {

public:

char* name;

void display() {

cout <

}

};

int main() {

Derived d;

d.name = "Derived Class";

d.Base::name = "Base Class";

Derived* dptr = &d;

// standard conversion from Derived* to Base*

Base* bptr = dptr;

// call Base::display()

bptr->display();

}

A) syntax error

B)Base Class

C) Derived Class

D) name

63. Match the following

1. this pointer                                          i) virtual

2. non static member function               ii) not transitive

3. friend function                                  iii) not modifiable

4. Friend class                                       iv) tightly coupled

A) 1-ii,2-I,3-iv,4-iii

B) 1-iii, 2-i, 3-ii, 4-iv

C) 1-iv,2-iii,3-I,4-ii

D) 1-iii,2-iv,3-I,4-ii

64. State true or false

1. A static member function cannot be declared with the keywords virtual, const,volatile,const volatile

2. A static member function can have access to the 'this' pointer of the class.

3. Friend classes are used in cases where one class is tightly coupled to another class.

4. Static data types can be accessed without instantiation of the class in C++.

A) true, true, false, false

B) true, true, true, false

C) true, false, true, true

D) false, true, true, true

65. match the following

1. godbit            i) End of file has been reached

2. eofbit          ii) Fatal I/O error

3. failbit          iii) non-fatal I/O error

4. badbit        iv) no errors

A) 1- ii 2-iii 3-iv 4-I

B) 1-iv 2- i 3-iii 4-ii

C) 1-iii, 2-i 3-iv 4-ii

D) 1- ii, 2- iv 3- iii 4-i

66. State true or false

i. When you are reading a file, if you want to ignore certain amount of characters use flush() function .

ii. Manipulators are global functions designed to be used in conjunction with insertion (<<) and

extraction >>operators.

iii. The essential characteristic of stream processing is that data elements must be sent to or

received from a stream one at a time, i.e. in serial fashion.

iv. The Input/Output system in C++ holds information about the result of every I/O operation.

A) true, true, true, true

B) false, true, true, false

C) false, true, true, true

D) false, true, false, true

67. ------------------------ are very useful when implementing generic constructs like vectors,

stacks, lists, queues which can be used with any arbitrary type.

A) Templates

B) constructor

C ) destructor

D) status Flag

68. Find the output of the following program

//virtual.cpp

# include

class base

{ public:

virtual void show() // virtual function

{cout<<"base”<

class derv1:public base

{ public:

void show()

{cout<<"derv1”<

class derv2: public base

{ public:

void show()

{cout<<“derv2”<

void main()

{

derv1 dv1;

derv2 dv2;

base *ptr;

ptr=&dv1;

ptr->show();

ptr=&dv2;

ptr->show();

}

A) derv 1


     derv2

B) derv2

derv2

C)derv1

derv1

D) syntax error

69. Which of these is/are true about exception specification

i) the exception specification is like function specification

ii) it tells the use to write exception handling code and what exception to handle.

iii) It tells the compiler the exception that may come out of this function.

A) i) only

B) i) and ii) only

C) i),ii) and iii)

D) i) and iii) only

70. State true or false

i. range_error is the exception class derived from logic_error Exception.

ii. bad_cast is the exception class derived from logic_error Exception.

iii. bad_alloc is the exception class derived from runtime_error Exception.

A) true, false, true

B) false, true, true

C) true, true, false

D) true, true, true

71.

Match the following

1. Stack            i) associative container

2. Queue         ii) sequence container

3. Vector       iii) LIFO

4. multimap      iv) FIFO

A) 1-ii, 2-iii, 3-iv, 4-I

B) 1-iii, 2-iv, 3-ii , 4- i

C) 1-iii, 2-iv , 3-i , 4-ii

D) 1-iv, 2-iii, 3-i, 4-ii

72. State true or false

i. STL algorithms are dependent of containers, which significantly reduces the

complexity of the library.

ii. Associative containers are not used to store objects that we want to be able to

retrieve using a key.

iii. Iterators are a generalized abstraction of pointers, designed to allow programmers to

access different container types in a consistent way.

A) false, false , true

B) true, false, false

C) true, true, false

D) true, true, true

73. Match the following

1. polymorphism          i. can be overloaded

2. inheritance              ii. Cannot be overloaded

3. constructor           iii. Reuse of code

4. destructor             iv. Same content different form

A) 1-ii 2-iii 3-iv 4-i

B) 1-iii 2-i 3-ii 4-iv

C) 1-iv 2-iii 3-i 4- ii

D) 1-iii 2-iv 3-i 4-ii

74. state true or false

a. The class diagrams describes the types of objects in the system and the static

relationship between them.

b. If the attribute is declared final its value can be changed.

c. The composition association is represented by the hollow diamond.

A) true ,true, false

B) true, false, false

C) false, false, false

D) false , true, true

75. State true or false

1. Static data need not be initialized.

2. Friend function can be declared anywhere within the class declaration.

3.The public and protected keywords do not apply to friend functions.

A) false, true , true

B) false, true, false

C) true, false , false

D) false, false, false

================================================
                                                 "the end"
================================================



SYSTEM PROGRAMMING

QUIZ QUESTION OF "SYSTEM PROGRAMMING OR SYSTEM SOFTWARE"

Unit 01

 Question 2

 Program translation model bridges the execution gap by translating a program written in a PL, called _______ into an equivalent program in the machine or assembly language of the computer system, called ______

  •   a. Source program (SP), target program (TP).
  • b. Syntax program, Analysis program
  • c. Source program (SP), Syntax program,
  • d. Analysis program, target program (TP).
================================================
Question 3


 Two fundamental language processing activities are _______and______

  •  a. Program Processor Activities, Program Execution Activities
  • b. Program Generation Activities, Program Source Activities
  • c. Program Processor Activities, Program Source Activities
  • d. Program Generation Activities, Program Execution Activities

================================================
Question 4


  ______ will govern the formation of valid statements in the source language.

  •   a. Lexical rules:
  • b. Syntax rules:
  • c. Semantic rules

  • d. Source rules
================================================
Question 5

  ________ is a program that converts one programming to another programming another language.

  •   a. Language builder
  • b. Language translator
  • c. Language processor
  • d. Language Activity
================================================
                                       Unit 2
================================================
Question 1


  Match the following

Mnemonic operation codes Choose... Microsoft Macro Assembler Low level language instruct the assembler to perform certain actions eliminates the need to memorize numeric operation codes

Assembly language Choose... Microsoft Macro Assembler Low level language instruct the assembler to perform certain actions eliminates the need to memorize numeric operation codes

Assembler directives Choose... Microsoft Macro Assembler Low level language instruct the assembler to perform certain actions eliminates the need to memorize numeric operation codes

MASM Choose... Microsoft Macro Assembler Low level language instruct the assembler to perform certain actions eliminates the need to memorize numeric operation codes
================================================
Question 2

 How many kinds of statements are there in assembly program

  a. 4

b. 1

c. 2

d. 3
================================================
Question 3

  Which of the following statement is NOT a purpose of pass-1 for assembler? 1. Determine length of machine instructions 2. Generate Instructions 3. Remember values of symbols until pass 2 4. Process some pseudo-operation

 a. 1

b. 2

c. 3

d. 4

================================================
Question 4

  _______ and ________are the two tasks performed by assembler.

 a. Generate instructions, Process pseudo-operations

b. Define symbols, Generate object

c. Process pseudo-operations, Define symbols

d. Generate object, Generate instructions
================================================
Question 5

  ________ is a program which accepts assembly language program as input and produces its equivalent machine language program as output.

  a. Data base

b. Assembler

c. Assembly

d. Directives
================================================
                                           Unit 3
================================================
Question 1


  Match the following

Lexical analysis Choose... Carving source program into sequence tokens Checks the tokens for patterns permitted Improve the target program by a factor of two in overall speed Converts intermediate code into machine instructions

Syntax analysis Choose... Carving source program into sequence tokens Checks the tokens for patterns permitted Improve the target program by a factor of two in overall speed Converts intermediate code into machine instructions

Code generation Choose... Carving source program into sequence tokens Checks the tokens for patterns permitted Improve the target program by a factor of two in overall speed Converts intermediate code into machine instructions

Code optimization Choose... Carving source program into sequence tokens Checks the tokens for patterns permitted Improve the target program by a factor of two in overall speed Converts intermediate code into machine instructions
================================================
Question 2

  Which of the following statement is NOT a phase in compilation? 1. Lexical analysis 2. Syntax analysis 3. intermediate code generation 4. identifier 5. code optimization 6. logical builder 7. code generation

  a. 1,2

b. 4,6

c. 3,5

d. 2,7
================================================
Question 3

 YACC, abbreviated from "Yet Another Compiler Compiler", is a __________ system tool program for generating C or C++ code for a parser.

  a. Linux

b. Unix

c. Windows

d. DOS
================================================
Question 4

  _______ and ________are the two types of optimization

 a. Local Optimization, Loop Optimization

b. Quick Optimization, Loop Optimization

c. Local Optimization, symbolic Optimization

d. Quick Optimization, symbolic Optimization
================================================
Question 5

  ________ is a translator which translates the program written in a high level language object language, which is a low level language.

 a. Interpreter

b. Assembler

c. Analyzer

d. Compiler
================================================
                                        Unit 4
================================================
Question 1


 During __________ the macro statement is replaced by sequence of assembly statements.

  a. Expansion

b. Macro expansion

c. Parameter passing

d. Execution
================================================
Question 2

  If macros are calling themselves, they are called as _______

  a. nested macro calls

b. recursive macro calls

c. nesting

d. macro expansion
================================================
Question 3

 Which of the following statement does NOT holds good for Macros? 1. Macros simplify coding 2. Macros reduce the amount of repetitive coding 3. Macros reduce errors caused by repetitive coding 4. Macros can have only two parameters 5. Macros cannot be used in C++ programming language 6. Macros make an assembly program more readable.

  a. 1,2

b. 3,6

c. 4,5

d. 2,7
================================================
Question 4

  ________ is a unit of specification for program generation through expansion.

 a. Interpreter

b. Macro

c. Source code

d. Compiler
================================================
                                           UNIT=5
================================================
Question 1


  In dynamic linking the subroutines of a library are loaded into an application program at _____ rather than being linked in at ______ and remain as separate files on disk.

 a. runtime, compile time

b. compile time, runtime

c. compile time, executing time

d. executing time, compile time
================================================
Question 2

  State true or false 1. A static library is a collection of object files which contain library routines and data. 2. A shared library is a shared object file that contains functions and data.

  a. 1-F, 2-T

b. 1-T, 2-F

c. 1-T, 2-T

d. 1-F, 2-F
================================================
Question 4


 _______ is a collection of subprograms used to develop software .

  a. Static linking

b. Library

c. Relocating

d. Loading
================================================
 Question 5

 _______ is used to combine multiple functions into a single executable module

  a. Static linking

b. Library

c. Relocating

d. Loading
================================================
                                           UNIT=6
================================================
Question 1


  In computer science, relocation is the process of replacing symbolic references or names of _______ with actual usable addresses in ________ before running a program.

  a. Memory, libraries,

b. Loader, memory

c. Memory, Loader

d. Libraries, memory
================================================
Question 2

  State true or false 1. Compilers or assemblers typically generate the executable code with zero as the lower-most, starting address. 2. The most fundamental functions of loader is to bring an object program into memory and starting its execution. 3. Traditionally, when developing a machine code manipulation tool, we need to read a decoder for every BFF we want to manipulate 4. When a program needs to be executed, the OS first executes all relevant file information and carries out any necessary actions before putting it into memory

  a. 1=T, 2=T, 3=T 4=F

b. 1=T, 2=T, 3=F 4=F

c. 1=T, 2=F 3=T 4=F

d. 1=T, 2=F 3=F 4=F
================================================
Question 3

 State true or false. 1. In addition to copying a program into main memory, the loader can also replace virtual addresses with physical addresses. 2. A binary object file is either an executable file that runs on a particular machine or a file containing object code that needs to be linked

  a. 1-T,2-F

b. 1-T,2-T

c. 1-F,2-F

d. 1-F,2-F
================================================
Question 4

 _______is a computer program that transfers data from offline memory into internal Storage

  a. Debugger

b. Assembler

c. Loader

d. Compiler
================================================
Question 5

  _________is a very small program (usually residing in ROM) which reads a fixed location on a disk (eg. the MBR) and passes control over to it.

  a. Absolute Loader

b. Boot strap Loader

c. Program Loader

d. Retargetable loader
================================================
                                           UNIT=7
================================================
Question 1


  In ________ memory allocation, memory is allotted to a variable before the execution of a program begins.

  a. stack

b. automatic

c. dynamic

d. static
================================================
Question 2

 Reference counting is a form of ________ memory management where each object has a count of the number of references to it.

 a. dynamic

b. automatic

c. stack

d. static
================================================
Question 3

 State True or False 1. Dynamic memory allocation is implemented using stacks and heaps 2. Memory allocation is the procedure used to perform memory binding.

  a. 1-T,2-T

b. 1-F,2-T

c. 1-T,2-F

d. 1-F,2-F
================================================
Question 4

  State True or False 1. Fortran is an example for dynamic memory allocation 2. Java is Object oriented programming Language 3. Pascal is an example for static memory allocation 4. malloc () function is available only in c programming

 a. 1-F, 2-T, 3-F, 4-F

b. 1-F, 2-T, 3-T, 4-F

c. 1-T, 2-T, 3-F, 4-F

d. 1-F, 2-T, 3-F, 4-T

================================================
 Question 5

 Two types of Dynamic memory allocation are ________ and _________

  a. Process control allocation, Stack allocation

b. Automatic allocation, process controlled allocation

c. Automatic allocation, program controlled allocation

d. Stack allocation, program controlled allocation

================================================
                                          UNIT=8
================================================
Question 2


  In Linear array of record there are two ways to represent names in the symbol table they are __________and_________

 a. Fixed Length representation, pointer to symbol table entry

b. Automatic Length representation, pointer to symbol table entry

c. Fixed Length representation, Pointer to Pointer table entry

d. Automatic Length representation, Pointer to Pointer table entry
================================================
Question 3

  State TRUE or FALSE 1.Hash tables are good in situations where you have enormous amounts of data 2.Compilers use a searching technique called as hashing, where a variant called as "Close hashing" is considered.

  a. 1-T,2-F

b. 1-F,2-T

c. 1-T,2-T

d. 1-F,2-F
================================================
Question 4

 Symbol table is a __________ which is used by compiler to keep track of scope and binding information about names.

  a. Stack

b. Data structure

c. Pointer

d. Organization
================================================
Question 5

  The actions required for the maintenance of a symbol table are: search, enter and ______

  a. Store

b. Return

c. Delete

d. List
================================================
                                   UNIT=9
================================================
Question 2


  State TRUE or FALSE 1. The design specifications for the program may be inconsistent or faulty: is a source of error 2. If the algorithms does not meet the design or incorrect results in error

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F
================================================
Question 3

  State TRUE or FALSE 1. Compiler can do true correction. 2. A more complex compiler transform the erroneous input into a similar but legal input on which normal processing can be resumed. 3. An array may be declared with too many dimensions to fit in the symbol table Will result in error this error is called as syntactic error 4. Languages such as APL and SNOBOL have several types, and the type of a name can Change at run time.

  a. 1-T, 2-T, 3-T,4-F

b. 1-F, 2-T, 3-T,4-F

c. 1-F, 2-T, 3-F,4-T

d. 1-F, 2-F, 3-T, 4-F
================================================
Question 4

 State TRUE or FALSE 1. Dynamic errors can be detected only at run time. 2. A compiler can insert errors as it translates the source program into an object program

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F
================================================
Question 5

 State TRUE or FALSE 1. The Error Handler is invoked when a flaw is detected in the syntax of source program. 2. Error Handler warns the programmer by issuing a diagnostic, and does not adjusts the information being passed from phase to phase.

  a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F
================================================
Question 6

  State TRUE or FALSE 1. The function of the lexical analyzer is to carve the stream of characters constituting the Source program into a sequence of bits. 2. Each bit class has a specification which is typically a regular set.

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F

================================================
 Question 7

 What is error handling?

 a. It is the process of identifying errors in the program

b. it is the process of recovering from errors.

c. It is the process of identifying error and also to recover from them.

d. None of the above
================================================
Question 8

  Which of the following is a true statement with respect to Dynamic error? 1. Dynamic error are detected at run time 2. Dynamic errors can be detected in all languages

  a. 1 only

b. 2 only

c. Both 1 and 2

d. None of them
================================================
Question 9

 Which of the following is a true statement with respect to Semantic errors? 1. Semantic errors can be detected both at compile time and run time 2. Declaration and scope are common examples for semantic errors

 a. 1 only

b. 2 only

c. Both 1 and 2

d. None of them
================================================
Question 10

 Which of the following is NOT a property of good error diagnostics?

 a. The messages should pinpoint the errors in terms of the original source program.

b. The error messages should be tasteful and understandable by the user .

c. The messages should be specific and should localize the problem

d. The messages should be redundant.
================================================
                                         UNIT=10
================================================
Question 2


 State TRUE or FALSE 1. Compiler can do true correction. 2. A more complex compiler transform the erroneous input into a similar but legal input on which normal processing can be resumed. 3. An array may be declared with too many dimensions to fit in the symbol table Will result in error this error is called as syntactic error 4. Languages such as APL and SNOBOL have several types, and the type of a name can Change at run time.

  a. 1-T, 2-T, 3-T,4-F

b. 1-F, 2-T, 3-T,4-F

c. 1-F, 2-T, 3-F,4-T

d. 1-F, 2-F, 3-T, 4-F
================================================
Question 3

 State TRUE or FALSE 1. Dynamic errors can be detected only at run time. 2. A compiler can insert errors as it translates the source program into an object program

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F
================================================
Question 4

 State TRUE or FALSE 1. RTOS is an operating System that guarantees a certain capability within a specified time Constraint 2. Windows 3.1 is a example for RTOS

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F
================================================
Question 5

 State TRUE or FALSE 1. The Error Handler is invoked when a flaw is detected in the syntax of source program. 2. Error Handler warns the programmer by issuing a diagnostic, and does not adjusts the information being passed from phase to phase.

  a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F

================================================
Question 6

  State TRUE or FALSE 1. The function of the lexical analyzer is to carve the stream of characters constituting the Source program into a sequence of bits. 2. Each bit class has a specification which is typically a regular set.

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F

================================================
Question 7

 Which of the following is a Function/s of operating system?

 a. Provides basic computing resourses (CPU, Memory, I/O devices).

b. Controls and coordinates the use of the hardware.

c. Define the ways in which the system resources are used to solve the computing problems

d. All the above
================================================
Question 8

 Which of the following is a NOT a Function/s of operating system?

 a. OS Contains interrupt service routines

b. OS deals with Process Management

c. OS helps in exchanging information between Processes

d. OS alone is responsible for compiling and executing C Program
================================================




 Question 9

  Which of the following is NOT a member of UNIX family?

  a. Linux

b. Solaris

c. Irix

d. MacOS
================================================
 Question 10

 Which of the following Statement is TRUE with respect to Multi threading?

 a. An operating system that allow different parts of a software program to run Concurrently.

b. An operating system that is capable of allowing multiple software processes to run at Same time

c. An operating allows multiple users to use same computer at the same time or different Time.

d. None of the above
================================================
                                       UNIT=11
================================================
Question 3


 State TRUE or FALSE 1. A Process is brought in to existence by some other process executing the fork() function. 2. As soon as the process has been fully created it is ready to run

 a. 1-T, 2-T

b. 1-F, 2-T

c. 1-T, 2-F

d. 1-F, 2-F

================================================

 Question 4

 State TRUE or FALSE 1. Running is the state of the Process that is actually executing on multi CPU systems. 2. Waiting is the state of a process which has not terminated for some reason

  a. 1-T, 2-F

b. 1-F, 2-T

c. 1-T, 2-T

d. 1-F, 2-F
================================================
Question 5

  The ____________  organizes the data about each process in a process table.

  a. Operating system

b. Stack pointer

c. Data structure

d. Program counter
================================================
Question 6

  What is Processes?

 a. It is the unit of work in a system.

b. The entity to which Processors are assigned

c. A program in Execution

d. All the above
================================================
Question 7

 Which of the following is a mechanism for creating a process.

  a. System initialization, including daemon processes.

b. Execution of a process creation system call by a running process.

c. A user request to create a new process.

d. All the above
================================================
Question 8

 Which of the following is NOT a Process termination mechanism.

 a. Normal Exit

b. Error Exit

c. Fatal Error

d. A user request
================================================
Question 9

 Which of the following is NOT TRUE with respect to Process Manager?

 a. It implements the Process abstraction.

b. It creates a model for the way the Process uses CPU and any system resources.

c. Identifies each process with Process ID which is unique

d. It implements CPU sharing
================================================
Question 10

  _____________ indicates the address of the next instruction to be executed for this Process.

 a. Register

b. Stack pointer

c. Data structure

d. Program counter
================================================
                                                     *THE END*
================================================

OPERATING SYSTEM WITH UNIX

QUIZ QUESTION OF "OPERATING SYSTEM WITH UNIX"

================================================
                                      Unit 01
================================================



Question 1
 Match the following

Operating system Choose... larger capacity system software application software smaller capacity

Library system Choose... larger capacity system software application software smaller capacity

secondary storage Choose... larger capacity system software application software smaller capacity

Main memory Choose... larger capacity system software application software smaller capacity
================================================
Question 2

  A process is _____________

  a. program in main memory

b. Program in cache memory

c. program in secondary storage

d. program in execution
================================================
Question 3

 A program to be executed must be in ________________

  a. main memory

b. secondary memory

c. virtual memory

d. Read only memory
================================================
Question 4

  A sequence of instructions telling the computer what to do is called a ____________

 a. program

b. language

c. translator

d. package
================================================
Question 5

 A _______________is a collection of processors that do not share memory, peripheral devices, or a clock.

 a. Computer system

b. distributed system

c. network

d. none of the above
================================================
Question 6

  _____________are very expensive and employed for specialized applications such as weather forecasting

  a. Micro computers

b. Super computers

c. Personal computers

d. Mainframe computers
================================================
                                        UNIT=2
================================================
Question 1


  Match the following.

QNX Choose... Based on the microkernel design Bell Labs CPU Software package

MPI Choose... Based on the microkernel design Bell Labs CPU Software package

gCore Choose... Based on the microkernel design Bell Labs CPU Software package

Plan9 Operating System Choose... Based on the microkernel design Bell Labs CPU Software package
================================================
Question 2

 In layered approach each layer uses the functions and services of ______________

 a. kernel

b. lower-level layers

c. higher-level layers

d. all of these
================================================
Question 3

 In MS-DOS, the interfaces and levels of functionality are ____________

  a. not well separated.

b. well separated

c. independent

d. dependent
================================================
Question 4

  PVM stands for

  a. Parallel Virtual Machine

b. Parallel Virtual Meassage

c. Process Virtual Machine

d. Process Virtual Monitor
================================================
Question 5

Using_________________ the file subsystem of Kernal mode is responsible for file and I/O management.

  a. system calls

b. device drivers

c. modules

d. virtualization technique
================================================
Question 6

  _________________ approach simplifies debugging and system verification.

  a. Kernel

b. Layered

c. Extended

d. Virtual machine

================================================



 Question 7

  _________________is a piece of computer software that isolates the application being used by the user from the computer.

  a. Compiler

b. Modules

c. Virtual machine

d. none of these
================================================
                                                UNIT=3
================================================
Question 1


 A context is the contents of a _________ and ________ at any point of time.

  a. MDR, IR

b. CPU registers, PC

c. MDR, PC

d. CPU registers, IR
================================================
Question 2

 A process control block contains varies attributes required by ____________to control a process.

  a. RAM

b. virtual memory

c. BIOS

d. Operating System
================================================
Question 3

  A process may create a new process by executing ___________system call.

  a. init

b. fork

c. create

d. new
================================================
Question 4

  Which of these is a reason for using threads in designing operating systems

  a. Unlike processes, threads are not independent of one another

b. All threads can access every address in the task .

c. Because threads can share common data, they do not need to use interprocess communication.

d. Like processes, thread can create children.
================================================
Question 5

  ______________ are popular way to improve application through parallelism

 a. Processes

b. Threads

c. Context switching

d. None of these
================================================
                                            UNIT=4
================================================
Question 1


  Arrange the following memories in terms of increasing access time (from low to high) 1. registers 2. Main memory 3. secondary memory 4. cache

  a. 1-3-4-2

b. 1-4-2-3

c. 3-2-4-1

d. 2-4-1-3

================================================
Question 2

  Microprocessors with small internal caches often employ the ________________mechanism

 a. direct mapping

b. fully associative

c. set associative

d. sector mapping
================================================
Question 3

 __________ deals with when a modified page should be written out to secondary memory.

 a. Cleaning policy

b. Fetch policy

c. Frame locking

d. None of these
================================================
Question 4

  ____________is responsible for allocating primary memory to processes and for assisting the programmer in loading and storing the contents of the primary memory.

 a. Operating system

b. Memory manager

c. Database administrator

d. RAM
================================================
Question 5

  ________________ refers to the technology in which some space in hard disk is used as an extension of main memory.

  a. Cache memory

b. Paging

c. Virtual memory

d. page
================================================
                                                   UNIT=5
================================================
Question 1


  A solution to starvation is _____________.

 a. segmentation

b. Aging

c. Paging

d. virtual memory
================================================
Question 2

 Given four processes with Burst time P1=6, P2=8, P3=7 and P4=3 calculate average waiting time using SJF scheduling algorithm.

 a. 7.0 ms

b. 10.25 ms

c. 3.0 ms

d. 17.0 ms
================================================
Question 3

  The time taken by the Dispatcher to stop one process and start another running is known as _________________.

  a. Turnaround time

b. Dispatch Latency

c. Access time

d. Response time
================================================
Question 4

 __________ systems are required to complete a critical task within a guaranteed amount of time.

  a. Virtual

b. soft real time

c. Hard Real time

d. None of these
================================================
Question 5

 ______________ selects a process from among the ready processes to execute on the CPU.

 a. CPU Schedular

b. Loader

c. Dispatcher

d. Compiler
================================================
                              UNIT=6
================================================
Question 1


  Match the following

pipes Choose... continuously change their state WNOHANG fixed size web server

livelock Choose... continuously change their state WNOHANG fixed size web server

Killing Zombies Choose... continuously change their state WNOHANG fixed size web server

argumen Choose... continuously change their state WNOHANG fixed size web server
================================================
Question 2

 When a child dies, it sends a __________________ signal to its parent.

a. SIGCHLD

b. EDEADLK

c. WNOHANG

d. SEDECHLD
================================================
Question 3

  When resources have multiple instances _________ is used for deadlock Avoidance.

 a. Banker's algorithm

b. Resource Allocation Graph

c. semaphores

d. all of these
================================================
Question 4

  ______________ is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.

  a. Semaphore

b. Deadlock

c. Mutual Exclusion

d. No preemption
================================================
Question 5

  __________________refers to a strategy where whenever a resource is requested, it is only granted if it cannot result in deadlock.

  a. Deadlock Prevention

b. Livelock

c. Deadlock avoidance

d. None of these
================================================
                                        UNIT=7
================================================
Question 1


  In an interrupt driven system, context switches from one process to another can only occur on _______________

 a. predetermined time

b. interrupt

c. Busy waiting

d. all of these
================================================
Question 2

  The introduction of mutual exclusion can prevent race conditions but can lead to problems such as _______________
 a. deadlock

b. starvation

c. Both a) and b)

d. None of these
================================================
Question 3

  ____________ is a mechanism the prevents two or more processes from accessing a shared resource simultaneously.

  a. Livelock

b. Preemption

c. Semaphore

d. Either a) or b)
================================================
Question 4

 ____________ occurs when two or more execution flows are able to run simultaneously.
    a. Deadlock

b. Concurrency

c. Race condition

d. Interrupt
================================================
Question 5

 _____________ occurs when multiple processes or threads read and write data items so that the final result depends on the order of execution of instructions in the multiple processes.

  a. Race condition

b. Mutual exclusion

c. Exception

d. Interrupt
================================================
                                        UNIT=8
================================================
Question 1


  A two-byte integer called __________ is interpreted as an index into an array of inodes in a fixed, known location on disk.

  a. an inode

b. an inumber

c. an imap

d. an imark

================================================
Question 2

 A variable sized block is called ____________

 a. an extent

b. a segment

c. a page

d. a fragment
================================================
Question 3

 In Multics, a process could have up to 256K segments, but each segment was limited to ___________ words.

 a. 64K

b. 32K

c. 1024K

d. 112K
================================================
Question 4

  In ____________ the disk drive itself has a way of discovering bad blockswith extremely high probability.

 a. disk index

b. Extents

c. Bad-block forwarding

d. back-up dumps
================================================
Question 5

  The problem with logical dumping is ______________

 a. very costly

b. very slow

c. human errors

d. all of these
================================================
                                    UNIT=9
================================================
Question 1


  Match the following

Programmed controlled I/O Choose... maskable and non maskable polled I/O Cycle stealing

Interrupt controlled I/O Choose... maskable and non maskable polled I/O Cycle stealing

DMA Choose... maskable and non maskable polled I/O Cycle stealing
================================================
Question 2

  A SCSI device can transfer up to____________ of information per second.
   a. 40 Mbytes

b. 60 Mbytes

c. 40 Gbytes

d. 60 Gbytes
================================================
Question 3

  Because the I/O devices are not synchronized with the CPU, some information must be exchanged between the CPU and the device to ensure that the data is received reliably. This interaction between the CPU and an I/O device is usually referred to as ____________________

  a. polling

b. arbitration

c. handshaking

d. interrupting
================================================
Question 4

  In___________, the requesting device or devices assert the signal bus_request.

  a. Priority encoded arbitration

b. Distributed arbitration by self-selection

c. Priority arbitration

d. Daisy chain arbitration
================================================
Question 5

  The controller can access memory in memory cycles which are not used by the particular bank of memory into which the DMA controller is writing data. This approach, called ________________

 a. interrupting

b. cycle stealing

c. swapping

d. paging
================================================
Question 6

  ______________ approach can place the data directly into the memory or take the data directly from the memory without direct intervention from the processor.

  a. DMA

b. Daisy chain arbitration

c. polling

d. none of these
================================================
                                         UNIT=10
================================================
Question 1


  Match the following

Process manager Choose... Device detection and installation Drawing windows and menus Communication between clients. Thread creation

IPC manager Choose... Device detection and installation Drawing windows and menus Communication between clients. Thread creation

PNP manager Choose... Device detection and installation Drawing windows and menus Communication between clients. Thread creation

Window manager Choose... Device detection and installation Drawing windows and menus Communication between clients. Thread creation
================================================
 Question 2

  SRM stands for

  a. Security Resource Manager

b. Secret Resource Manager

c. Security Reference Monitor

d. Security Reference Manual
================================================
Question 3

  The two sub systems of user mode layer of windows 2000 are _______ and _______

  a. excel, executive

b. environment, integral

c. orbit, kernel

d. Kernel, executive
================================================
Question 4

  Windows 2000 supports _______________ type of file system

  a. NTFS

b. EFS

c. FEFS

d. EFFS
================================================
Question 5

  Windows NT operating system architecture consists of _______ and __________layers.

 a. physical, data link

b. Micro , Macro

c. user mode, Kernel mode

d. Physical , Micro
================================================
Question 6

 ___________ file system allows sharing in multiple different locations grouped under one folder.

  a. Direct

b. distributed

c. sequential

d. parallel
================================================
                                  UNIT=1(B)
================================================
Question 1


 Match the following

kernel Choose... Case sensitive: Switches between processes Initialization of I/O devices Sells UnixWare

Operating system Choose... Case sensitive: Switches between processes Initialization of I/O devices Sells UnixWare

Unix commands Choose... Case sensitive: Switches between processes Initialization of I/O devices Sells UnixWare

Novell Choose... Case sensitive: Switches between processes Initialization of I/O devices Sells UnixWare
================================================
Question 2

  A standard UNIX system includes a set of ___________ and a set of ___________.

 a. Commands ,files

b. Libraries, Applications

c. Libraries, files

d. Files, Applications
================================================
Question 3

 BSD stands for_____.

  a. Basic Software Division

b. Berkeley Software Distribution

c. British Software Distribution

d. Berkeley Software data
================================================
Question 4

 Initialization of I/O devices is part of the_________.

 a. CPU

b. MSDOS

c. UNIX kernel

d. None of the above
================================================
Question 5

 UNIX operating system is a layer between the ________ and the __________that run on the computer.

  a. Process, File

b. Word processor, Application

c. Hardware, Applications

d. Process,Hardware
================================================
                                   UNIT=2(B)
================================================
Question 1


  Ext2 is the standard file system of _______ and uses a block size of_____bytes

  a. MS DOS,8K

b. Linux ,1024

c. Linux, 512

d. Unix, 512
================================================
Question 2

  Match the following

Bootstrap Choose... Hardware dependent not readable to every user Runs as process 0 on SVR5 Does not easily support random access

Shadow file Choose... Hardware dependent not readable to every user Runs as process 0 on SVR5 Does not easily support random access

Tape media Choose... Hardware dependent not readable to every user Runs as process 0 on SVR5 Does not easily support random access

sched Choose... Hardware dependent not readable to every user Runs as process 0 on SVR5 Does not easily support random access
================================================
Question 3

 Fsck conducts a check in _____ phases

  a. One

b. Two

c. Five

d. Eight
================================================
Question 4

 Bootstrapping is also known as ______

 a. cold-hot boot

b. hot boot

c. hot strap

d. cold boot
================================================
Question 5

  Removal cartridge drives have _____capacity and _______cost per megabyte

 a. Higher,lower

b. lower,cheaper

c. higher,higher

d. lower, higher
================================================
                                            UNIT=3(B)
================================================
Question 1


 Match the following

shared memory Choose... allows two related processes Random access. to view open files of processes attribute that directly affect execution

lsof command Choose... allows two related processes Random access. to view open files of processes attribute that directly affect execution

pipe Choose... allows two related processes Random access. to view open files of processes attribute that directly affect execution

UID Choose... allows two related processes Random access. to view open files of processes attribute that directly affect execution
================================================
Question 2

  A shared memory segment first needs to be allocated (created), using the__________ system call.

  a. semget()

b. msgrcv()

c. shmget()

d. mknod()
================================================
Question 3

 An orphan process is automatically inherited by the _____and becomes a _______ of this process.

 a. 'init' process, father

b. 'init' process, child

c. 'initial' process, father

d. 'it' process, child
================================================
Question 4

  Creation of a semaphore set is done using the _______system call.

  a. semget()

b. semsget()

c. mknod()

d. sempget()
================================================
Question 5

 The msgget() system call accepts two parameters , ________and _______

 a. key, pid

b. queue key, pid

c. queue key, flags.

d. call,flags
================================================
                                             UNIT=4(B)
================================================

 Question 1


  Match the following

exit Choose... Control character version of C shell Environment variable Normal way to logout

tcsh Choose... Control character version of C shell Environment variable Normal way to logout

eof Choose... Control character version of C shell Environment variable Normal way to logout

TERM Choose... Control character version of C shell Environment variable Normal way to logout
================================================
Question 2

  An option commonly takes the form of a _____followed by __________characters.

  a. dot, one or more

b. dash, only one

c. dash, one or more

d. dot,only two
================================================
Question 3

  The _________takes any characters from standard input, and then echoes them to standard output.

 a. kill character

b. cat command

c. cate command

d. control command
================================================
Question 4

  UNIX systems originally came with a command interpreter called the________

 a. Bourne Shell

b. Born Shell

c. POSIX shell

d. korn shell
================================================
Question 5

  ^S and ^Q are the normal values of control characters _____and ______respectively.

 a. start,exit

b. Stop, Start

c. set, stop

d. state,start
================================================
                                             UNIT=5(B)
================================================
Question 1


 State whether the following statements are True (T) or False (F) a. When you copy a file into a directory, cp creates the new file with the different name. b. The name cat derives from the word gatecate, which means to connect in a series or to link together. c. UNIX is a multiuser operating system, which means that you share the system with other users. d. There are no differences between hard and symbolic links.

 a. a-T, b-T c-T, d-F

b. a-F, b-F, c-T d-T

c. a-T b-F, c-T ,d-F

d. a-F, b-F, c-T, d-F
================================================
Question 2

  When copying more than one file at a time, you must specify an existing directory as the ___________

  a. Source

b. Sub directory

c. Destination.

d. Path name
================================================
Question 3

  Which of the following statements are true i. Filenames can be as long as 255 characters in System V Release 4 UNIX. ii. Like cp, mv can handle multiple files if the destination is a file. iii. To change your umask, enter mask and a two digit number that specifies your new umask. iv. Named pipes enable you to communicate with a running program by reference to a file.

  a. ii and iii

b. ii and iv

c. i and iv

d. i and iii
================================================
Question 4

 Which one of the following statements is true?

  a. The cat command cares which file it receives as input or where the input goes.

b. Relative pathnames begin with something other than the slash character

c. UNIX shells never remember their current working directory (CWD).

d. The cat command interprets -X as an option character rather than a pathname.
================================================
Question 5

  _____________enables you to examine the contents of files with commands such as cat, write permission enables you to alter the contents of a file or truncate it, and execute permission is necessary to run a file as a____________.

  a. Read permission, command

b. Write permission, command

c. Read permission, tree

d. Write permission, pathname
================================================
                                          UNIT=6(b)
================================================
Question 1


 One of the wonderful things about UNIX is its ___________names.

  a. Unlimited path

b. Unlimited directory

c. Limited path

d. Limited file
================================================
Question 2

 One reason why UNIX is so flexible is that each program is automatically assigned three standard files. They are

  a. The standard input file, the standard output file, and the standard error file.

b. The backup file, the standard output file, and the standard error file.

c. The standard input file, the standard output file, and the standard hidden file.

d. The standard input file, the standard search file, and the standard error file.
================================================
Question 3

  State whether the following statements are True (T) or False (F) a. The ls command can also accept a filename as a command line parameter. b. When a file is created, the path can inadvertently acquire printable numbers. c. The -size n expression is a good example of a search criterion that is evaluated numerically. d. A program that takes standard file and creates standard input is sometimes called a filter.

 a. a-T,b-T,c-F,d-F

b. a-F,b-F,c-T,d-T

c. a-T,b-F,c-F,d-T

d. a-T,b-F,c-T,d-F
================================================
Question 4

 The find command is different from most UNIX commands in that each of the argument expressions following the beginning path name is considered a _____________

 a. action expression

b. Boolean expression.

c. Boolean constant

d. Search qualifiers
================================================
Question 5

  The pipe symbol () causes the __________of the program on the left side of the pipe to be passed directly to the ___________of the program on the right side of the pipe symbol.

  a. Simple output, single input

b. Standard output, standard input

c. Single input, single output

d. Standard file, standard input
================================================
                                             UNIT=7(b)
================================================
Question 1


 RPN stands for

 a. Reverse Polish Notation

b. Record Police Notation

c. Record Polish Notation

d. Reverse Police Negation
================================================
Question 2

  State whether the following statements are True (T) or False (F) a. When a system administrator creates an account for a user, that user is given a login ID and also placed in a group. b. The du command reports the number of disk blocks used for each directory and subdirectory, and the files found there. c. The y option shows the year as a four-digit value and the Y option shows the year as a number between 00 and 99. d. The FILES section shows the command's syntax by listing all possible options and arguments.

  a. a-T, b-T, c-F, d-F

b. a-F, b-F, c-T, d-T

c. a-T, b-F, c-F, d-T

d. a-T, b-F, c-T, d-F
================================================
Question 3

 The id command reports four things. They are
   a. The user ID number, login name, login password, and group name of the person who invokes it.

b. The user password, login name, single ID number, and names of the persons who invokes it.

c. The user password, login name, path number, and name of the person who invokes it.

d. The user ID number, login name, group ID number, and group name of the person who invokes it.
================================================
Question 4

  The usual su command syntax is

 a. su-pwd

b. su-pd

c. su - userID

d. Sue- ID
================================================
Question 5

 UNIX supplies information about its commands in two forms:They are

 a. Record manuals and online files

b. Normal form and online form

c. Reference manuals (printed documentation called man pages) and online files.

d. Reference manuals and off line files.
================================================
                                         UNIT=8(b)
================================================
Question 1


 State whether the following statements are True (T) or False (F) a. The continue command causes the program to exit the loop immediately, and the break command causes the program to skip the remaining commands in the loop but remain in the loop. b. The check command examines some condition and returns a zero exit status if the condition is true and a nonzero exit status if the condition is false. c. When the shell interprets the line of input, it does not make filename and variable substitutions, but it does remove excess white space. d. In the Bourne shell, you can change the default action of your program when a signal is received by using the trap command.

 a. a-T, b-T, c-F, d-F

b. a-F, b-F, c-T, d-T

c. a-T, b-F, c-F, d-T

d. a-T, b-F,c-T,d-F
================================================
Question 2

 The most common way to retrieve the value of a variable is to precede the variable name with a __________causing the value of the variable to be substituted at that point.

  a. dollar sign ($)

b. star sign(*)

c. percent sign (%)

d. equal sign(

e. )
================================================
Question 3

  Which of the following statements are true? i. Normally, a looping construct executes all the commands between the do statement and the done statement. ii. In most higher level programming languages, variables are typed, meaning that they are not restricted to certain kinds of data, such as numbers or characters. iii. A program can get data in two ways: either it is passed to the program when it is executed as arguments, or the program gets data interactively. iv. Using the echo command in your program, you can determine whether a file exists, whether it can be written to, and several other conditions.

  a. i and iv

b. iii and iv

c. i, ii and iii

d. i and iii
================================================
Question 4

  __________ Contains the number of arguments passed to the program in the form of positional variables and _________contains all the positional arguments passed to the program.

 a. $ , $*

b. $*, $

c. *$, $

d. $*,
================================================
Question 5

  ___________variable is not automatically created on all UNIX systems but is used by so many programs that it is considered a standard environment variable.

 a. IFS

b. MAIL

c. TERM

d. PATH
================================================
                                             *the end*
================================================

Popular Posts

Recent Posts