Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

Wednesday, June 03, 2020

Advance operating system and compiler design

Which of the following system software resides in main memory always?
a. Text editor
b. Assembler
c. Linker
d. Loader
Answer: d

Daisy chain is a device for
a. Interconnecting a number of devices to number of controllers
b. Connecting a number of devices to a controller
c. Connecting a number of controller to devices
d. All of above
Answer: b

Producer consumer problem can be solved using
a. semaphores
b. event counters
c. monitors
d. all of above
Answer: d

What is bootstraping? 
a. A language interpreting other language program
b. A language compiling other language program
c. A language compile itself
d. All of above
Answer: c

Which of the following can be used as a criterion for classification of data structures used in language processing.
a. nature of  a data structure
b. purpose of a data structure
c. lifetime of a data structure
d. all of the above
Answer: d

Which of the following program is not a utility?
a. Debugger
b. Editor
c. Spooler
d. All of the above
Answer: c

A development stategy whereby the executive control modules of a system are coded and tested first, is known as
a. Bottom-up development
b. Top-down development
c. Left-Right development
d. All of the above
Answer: b

Systems software is a program that directs the overall operation of the computer, facilitates its use and interacts with the users. What are the different types of this software?
a. Operating system
b. Languages
c. Utilities
d. All of the above
Answer: d

The Process Manager has to keep track of:
a. the status of each program
b. the priority of each program
c. the information management support to a programmer using the system
d. both a and b
Answer: d

A sequence of instructions, in a computer language, to get the desired result, is known as
a. Algorithm
b. Decision Table
c. Program
d. All of the above
Answer: c

Running time of a program depends on
a. The way the registers and addressing modes are used
b. The order in which computations are performed
c. The usage of machine idioms
d. All of these
Answer: d

Object program is a
a. Program written in machine language
b. Program to be translated into machine language
c. Translation of high-level language into machine language
d. None of the mentioned
Answer: c

Programs that coordinate computer resources, provide an interface between users and the computer, and run applications are called
a. utilities
b. operating systems
c. device drivers
d. language translators
Answer: b

Specialized programs that allow particular input or output devices to communicate with the rest of the computer system are called
a. operating systems
b. utilities
c. device drivers
d. language translators
Answer: c

Also known as a service program, this type of program performs specific tasks related to managing computer resources.
a. utility
b. operating system
c. language translator
d. device driver
Answer: a

The items that a computer can use in its functioning are collectively called its
a. resources
b. stuff
c. capital
d. properties
Answer: a

Programs that coordinate all of the computer’s resources including memory, processing, storage, and devices such as printers are collectively referred to as
a. language translators
b. resources
c. applications
d. interfaces
Answer: b

The object code is then passed through a program called a ___________ which turns it into
an executable program.
a. Integer
b. Source code
c. Linker
d. None of the above
Answer: c

Software that measures, monitors, analyzes and controls real world events is called
a. System software
b. Business software
c. Scientific software
d. Real time software
Answer: d

In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun ?
a. Serially usable
b. Re-entrable module
c. Non reusable module
d. None of these
Answer: b

System generation
a. is always quite simple
b. is always very difficult
c. varies in difficulty between systems
d. requires extensive tools to be understandable
Answer: d

Which of the following system program foregoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be executed immediately upon completion of the assembly ?
a. Macro processor
b. Load and go assembler
c. Two pass assembler
d. Compiler
Answer: b

Translator for low level programming language were termed as
a. Assembler
b. Compiler
c. Linker
d. Loader
Answer: a

Assembler is a machine dependent, because of?
a. Macro definition table(MDT)
b. Pseudo operation table(POT)
c. Argument list array(ALA)
d. Mnemonics operation table(MOT)
Answer: d

The assembler stores all the names and their corresponding values in ______ .
a. Special purpose Register
b. Symbol Table
c. Value map Set
d. None of the above
Answer: b

In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with
a. creation of more optical matrix
b. recognition of basic elements and creation of uniform symbols
c. use of macro-processor to produce more optimal assembly code
d. recognization of basic syntactic construction through reductions
Answer: a

In analyzing the compilation of PL/I program the description " resolving symbolic address ( lables ) and generating machine language " is associated with
a. syntax analysis
b. code generation
c. storage assignment
d. assembly and output
Answer: d

Which of the following translation program converts assembly language programs to object program
a. Loader
b. Compiler
c. Assembler
d. Macroprocessor
Answer: c

Loop is a collection of nodes that is
a. strongly connected and has a unique entry
b. loosely connected and has a unique entry
c. strongly connected
d. none of these
Answer: a

Which of the following system program forgoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be  executed immediately upon completion of the assembly?
a. compiler
b. macroprocessor
c. two pass assembler
d. load-and-go assembler
Answer: d

Which of the following is not a feature of compiler ?
a. Execution time is more
b. When all the syntax errors are removed execution takes place
c. Scans the entire program first and then translate it into machine code
d. slow for debugging
Answer: a

In distributed system, each processor has its own ___________
a) local memory
b) clock
c) both local memory and clock
d) none of the mentioned
Answer: c

If one site fails in distributed system then ___________
a) the remaining sites can continue operating
b) all the sites will stop working
c) directly connected sites will stop working
d) none of the mentioned
Answer: a

Which technique is based on compile-time program transformation for accessing remote data in a distributed-memory parallel system?
a) cache coherence scheme
b) computation migration
c) remote procedure call
d) message passing
Answer: b

Processes on the remote systems are identified by ___________
a) host ID
b) host name and identifier
c) identifier
d) process ID
Answer: b

In distributed systems, link and site failure is detected by ___________
a) polling
b) handshaking
c) token passing
d) none of the mentioned
Answer: b

The capability of a system to adapt the increased service load is called ___________
a) scalability
b) tolerance
c) capacity
d) none of the mentioned
Answer: a

What is not true about distributed system ?
a. It is a collection of processor
b. All processors are synchronized
c. They do not share memory
d. None of the mentioned
Answer: b

What are characteristics of processor in distributed system ?
a. They vary in size and function
b. They are same in size and function
c. They are manufactured with single purpose
d. They are real-time devices
Answer: a

What are characteristics of distributed file system ?
a. Its users, servers and storage devices are dispersed
b. Service activity is not carried out across the network
c. They have single centralized data repository
d. There are multiple dependent storage devices
Answer: a

What is not a major reason for building distributed systems ?
a. Resource sharing
b. Computation speedup
c. Reliability
d. Simplicity
Answer: d

What are characteristic of Network Operating Systems ?
a. Users are aware of multiplicity of machines
b. They are transparent
c. They are simple to use
d. All of the mentioned
Answer: a

How are access to resources of various machines is done ?
a. Remote logging using ssh or telnet
b. Zone are configured for automatic access
c. FTP is not used
d. All of the mentioned
Answer: a

What are characteristics of Distributed Operating system ?
a. Users are aware of multiplicity of machines
b. Access is done like local resources
c. Users are aware of multiplicity of machines
d. They have multiple zones to access files
Answer: b

What are characteristics of computation migration ?
a. transfer data by entire file or immediate portion required
b. transfer the computation rather than the data
c. execute an entire process or parts of it at different sites
d. none of the mentioned
Answer: b

What are characteristics of process migration ?
a. transfer data by entire file or immediate portion required
b. transfer the computation rather than the data
c. execute an entire process or parts of it at different sites
d. none of the mentioned
Answer: b

What is common problem found in distributed system ?
a. Process Synchronization
b. Communication synchronization
c. Deadlock problem
d. Power failure
Answer: c

What are the different ways in which clients and servers are dispersed across machines ?
a. Servers may not run on dedicated machines
b. Servers and clients can be on same machines
c. Distribution cannot be interposed between a OS and the file system
d. OS cannot be distributed with the file system a part of that distribution
Answer: b

______ of the distributed file system are dispersed among various machines of distributed system.
a. Clients
b. Servers
c. Storage devices
d. All of the mentioned
Answer: d

_______ is not possible in distributed file system.
a. File replication
b. Migration
c. Client interface
d. Remote access
Answer: b

Which one of the following hides the location where in the network the file is stored?
a. transparent distributed file system
b. hidden distributed file system
c. escaped distribution file system
d. spy distributed file system
Answer: a

In distributed file system, when a file’s physical storage location changes
a. file name need to be changed
b. file name need not to be changed
c. file’s host name need to be changed
d. file’s local name need to be changed
Answer: b

In distributed file system, _______ is mapping between logical and physical objects.
a. client interfacing
b. naming
c. migration
d. heterogeneity
Answer: b

In distributed file system, a file is uniquely identified by
a. host name
b. local name
c. the combination of host name and local name
d. none of the mentioned
Answer: b

For proper synchronization in distributed systems
a. prevention from the deadlock is must
b. prevention from the starvation is must
c. prevention from the deadlock & starvation is must
d. none of the mentioned
Answer: c

Some code optimizations are carried out on the intermediate code because
A. they enhance the portability of the compiler to other target processors
B. program analysis is more accurate on intermediate code than on machine code
C. the information from dataflow analysis cannot otherwise be used for optimization
D. the information from the front end cannot otherwise be used for optimization
Answer: A

One of the purposes of using intermediate code in compilers is to
A. make parsing and semantic analysis simpler.
B. improve error recovery and error reporting.
C. increase the chances of reusing the machine-independent code optimizer in other compilers.
D. improve the register allocation.
Answer: C

The method which merges the bodies of two loops is
a) Loop rolling
b) Loop jamming
c) Constant folding
d) None of the mentioned
Answer: b

The process manager has to keep track of
a) Status of each program
b) Information to a programmer using the system
c) Both of the mentioned
d) None of the mentioned
Answer: c

Which of the following functions is performed by loader?
a) Allocate memory for the programs and resolve symbolic references between objects decks
b) Address dependent locations, such as address constants, to correspond to the allocated space
c) Physically place the machine instructions and data into memory
d) All of the mentioned
Answer: d

Which of the following is true for machine language?
a) Continuous execution of program segments
b) Depicting flow of data in a system
c) A sequence of instructions which solves a problem
d) The language which interacts with the computer using only the binary digits 1 and 0.
Answer: d

A linker is given object module for a set of programs that were compiled separately. What is not true about an object module
a) Object code
b) Relocation bits
c) Names and locations of all external symbols denied in the object module
d) Absolute addresses of internal symbols
Answer: d

In which way a macro processor for assembly language can be implemented?
a) Independent two-pass processor
b) Independent one-pass processor
c) Processor put into pass 1 of a standard two pass assembler
d) All of the mentioned
Answer: d

Local and loop optimization in turn provide motivation for
A. data flow analysis
B. constant folding
C. peep hole optimization
D. DFA and constant folding
Answer: A

A compiler for a high-level language that runs on one machine and produces code for a different machine is called
A. optimizing compiler
B. one pass compiler
C. cross compiler
D. multipass compiler
Answer: C

The optimization technique which is typically applied on loops is
A. removal of invariant computation
B. peephole optimization
C. constant folding
D. all of these
Answer: D

In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with
A. recognization of basic syntactic construction through reductions
B. recognition of basic elements and creation of uniform symbols
C. creation of more optical matrix
D. use of macro-processor to produce more optimal assembly code
Answer: C

In an aboslute loading scheme, which loader function is accomplished by programmer?
A. Allocation
B. LInking
C. Reallocation
D. both (A) and (B)
Answer: D

Advantage of incorporating the macro-processor into pass 1 is that
a) Many functions have to be implemented twice
b) Functions are combined not necessarily creating intermediate files as output from the macro-processor and input to the assembler
c) More flexibility is provided to the programmer in that he may use all the features of the assembler in conjunction with macros
d) All of the mentioned
Answer: d

System program such a s compiler are designed so that they are
a) Re-enterable
b) Non reusable
c) Serially usable
d) None of the mentioned
Answer: a

Which of the following system program forgoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be executed immediately upon completion of the assembly?
a) Two pass assembler
b) Load and go assembler
c) Macro processor
d) Linker
Answer: b

The specific task storage manager performs
a) Allocation/ deal location of programs
b) Protection of storage area assigned to the program
c) Both of the mentioned
d) None of the mentioned
Answer: c

Disadvantage of ” Compile and GO ” loading scheme is that
a) Memory is wasted because the case occupied by the assembler is unavailable to the object program
b) Necessary to translate the users program
c) It is very difficult to handle multiple segments, even when the source programs are in different languages and to produce orderly modular programs
d) All of the mentioned
Answer: d

Function of the storage assignment is
a) Assign storage to all variables referenced in the source program
b) Assign storage to all temporary locations that are necessary for intermediate results
c) Assign storage to literals, and to ensure that the storage is allocated and appropriate locations are initialized
d) All of the mentioned
Answer: d

Generation of intermediate code based on a abstract machine model is useful in compilers because
a) Implementation of lexical analysis and syntax analysis is made easier
b) Writing for intermediate code generation
c) Portability of the front end of the compiler
d) None of the mentioned
Answer: a

An optimizer Compiler
a) Is optimized to occupy less space
b) Both of the mentioned
c) Optimize the code
d) None of the mentioned
Answer: d

Pee Hole optimization
a) Loop Optimization
b) Local Optimization
c) Constant folding
d) Data Flow analysis
Answer: c

The optimization which avoids test at every iteration is
a) Loop unrolling
b) Loop jamming
c) Constant folding
d) None of the mentioned
Answer: a

Some code optimizations are carried out on the intermediate code because
a) They enhance the portability of the complier to other target processors
b) Program analysis is name accurate on intermediate code than on machine code
c) The information from data flow analysis cannot otherwise be used for optimization
d) The information from the front end cannot otherwise be used for optimization
Answer: b

What data structure in a complier is used for managing information about variables and their attributes?
a) Abstract syntax tree
b) Symbol table
c) Semantic stack
d) Parse table
Answer: b

Which languages necessarily need heap allocation in the runtime environment?
a) Those that support recursion
b) Those that use dynamic scoping
c) Allow dynamic data structure
d) Those that use global variables
Answer: c

_________ or scanning is the process where the stream of characters making up the source program is read from left to right and grouped into tokens.
a) Lexical
b) Diversion
c) Modelling
d) None of the mentioned
Answer: a

Which of the following is used for grouping of characters into tokens?
a) Parser
b) Code optimization
c) Code generator
d) Lexical analyzer
Answer: d

The lexical analyzer takes _________as input and produces a stream of _______as output.
a) Source program, tokens
b) Token, source program
c) Either A and B
d) None of the mentioned
Answer: a

The action of parsing the source program into proper syntactic classes is called
a) Syntax analysis
b) Lexical analysis
c) Interpretation analysis
d) General syntax analysis
Answer: b

Pick the machine independent phase of the compiler
a) Syntax analysis
b) Code generation
c) Lexical analysis
d) A, C and D
Answer: d

A system program that combines the separately compiled modules of a program into a form suitable for execution
a) Assembler
b) Linking loader
c) Cross compiler
d) Load and Go
Answer: b

Loading process can be divided into two programs. The first is binder the other is
a) Linkage editor
b) Module Loader
c) Relocate
d) None of the mentioned
Answer: b

Non modifiable procedures are called
a) Concurrent procedures
b) Serially usable procedures
c) Re-entrant procedures
d) Top down procedures
Answer: b

Which is not true about syntax and semantic parts of a computer language?
a) Semantics is checked mechanically by a computer
b) Semantics is the responsibility of the programmer
c) All of the mentioned
d) None of the mentioned
Answer: d

The identification of common sub-expression and replacement of run-time computations by compile-time computations is
a) Local optimization
b) Loop optimization
c) Constant folding
d) Data flow analysis
Answer: c

The graph that shows basic blocks and their successor relationship is called
a) Dag
b) Flow Graph
c) Control Graph
d) Hamilton Graph
Answer: b

The specific task storage manager performs
a) Allocation/ deal location of programs
b) Protection of storage area assigned to the program
c) Both of the mentioned
d) None of the mentioned
Answer: c

In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun?
a) Non usable module
b) Serially usable
c) Re-enter-able
d) None of the mentioned
Answer: c

Dividing a project into segments and smaller units in order to simplify design and programming efforts is called
a) Modular approach
b) Top down approach
c) Bottom up approach
d) Left right approach
Answer: a

Which of the following is true for machine language?
a) Continuous execution of program segments
b) Depicting flow of data in a system
c) A sequence of instructions which solves a problem
d) The language which interacts with the computer using only the binary digits 1 and 0
Answer: d

A linker is given object module for a set of programs that were compiled separately. What is not true about an object module
a) Object code
b) Relocation bits
c) Names and locations of all external symbols denied in the object module
d) Absolute addresses of internal symbols
Answer: d

____________ refer to renewing or changing components like increasing the main memory, or hard disk capacities, or adding speakers, or modems, etc.
a) Grades
b) Prosody
c) Synthesis
d) Upgrades
Answer: d

From the following statements which one is not a valid deadlock prevention scheme?
a. Number the resources uniquely and never request a lower numbered resource than the last one
b. Release all the resources before requesting for a new resource
c. Request all the resources before execution
d. Never request a resource after releasing any resources
Answer: d

The main function of the command interpreter is
a. To handle the compiler.
b. To handle the parser.
c. To get and execute the next user-specified command.
d. None of the above.
Answer: c

Which technique is used to temporarily removing non-active programs from the memory of computer system?
a. Swapping
b. Spooling
c. Scheduler
d. None of the above.
Answer: a

How you will describe Throughput in operating system?
a. Number of times a program produces output.
b. Number of times the program is running.
c. Number of programs processed by it per unit time
d. None of the above.
Answer: c

Saturday, May 13, 2017

COMPUTER APTITUDE TEST FOR BCA(H)/B.SC.(IT)

1. Which of the following are components of Central Processing Unit (CPU)?
A.                 Arithmetic logic unit, Mouse
B.                 Arithmetic logic unit, Control unit
C.                  Arithmetic logic unit, Integrated Circuits
D.                 Control Unit, Monitor

2. If a computer provides database services to other, then it will be known as?

A.                 Web server
B.                 Application server
C.                  Database server
D.                 FTP server

3. In which of the following form, data is stored in computer?

A.                 Decimal
B.                 Binary
C.                  HexaDecimal
D.                 Octal

4. Who was the father of Internet?

A.                 Charles Babbage
B.                 Vint Cerf
C.                  Denis Riche
D.                 Martin Cooper

5. What is the name of first super computer of India?

A.                 Saga 220
B.                 PARAM 8000
C.                  ENIAC
D.                 PARAM 6000

6. Which is most common language used in web designing?

A.                 C
B.                 C++
C.                  PHP
D.                 HTML

7. Which among following is odd?

A.                 CD/DVD
B.                 Floppy Disks
C.                  SD Disk
D.                 BIOS

8. Which program is run by BIOS to check hardware components are working? 

A.                 DMOS
B.                 POST
C.                  CMOS
D.                 RIP

 

9. MPG is a file extension of which type of files?

A.                 Audio
B.                 Image
C.                  Video
D.                 Flash
  

10. 1 Mega Byte is equal to

A.                 1024 Bytes
B.                 1024 Kilo Bytes
C.                  1024 Giga Bits
D.                 1024 Bits

11.  IP address version 4 is in which format?

A.                 4 bit
B.                 8 bit
C.                  16 bit
D.                 32 bit

12. Who invented C++?

A.                 Steve Jobs
B.                 James Gosling
C.                  Bjarne Stroustrup
D.                 Dennis Ritchie

13. One nibble is equal to how many bits?

A.                 4 bits
B.                 8 bits
C.                  12 bits
D.                 16 bits

 

14. Which term is related to database?

A.                 PHP
B.                 Java
C.                  Oracle
D.                 Assembly

15. Who invented Java?

A.                 Deniss Ritche
B.                 James Gosling
C.                  Bajarnae
D.                 Linus Torvalds

 

16. What is full form of HTTP?

A.                 Hyper Transfer Text Protocol
B.                 Hyper Text Transfer Protocol
C.                  Hexagonal Text Transfer Protocol
D.                 Hexagonal Text Transfer Prototype

 

17. What is the name of a device that converts digital signals to analog signals?

A.                 Router
B.                 Switch
C.                  Modem
D.                 None of above

 

18. C is what kind of language?

A.                 An assembly language
B.                 A third generation high level language
C.                  A machine language
D.                 Future language

19. Which of the following is a non-volatile memory?

A.                 RAM
B.                 LSI
C.                  VLSI
D.                 ROM

20.  Which is not an operating System?

A.                 Unix
B.                 Linux
C.                  Windows
D.                 Java

21. ++i is equivalent to

A.                 i = i + 2
B.                 i = i + 1
C.                  i = i + i
D.                 i = i - 1

 

22. Minimum number of stacks of size n required to implement a queue of size n

A.                 One
B.                 Two
C.                  Three
D.                 Four

23. Recursive problem is implemented by

A.                 queues
B.                 stacks
C.                  linked lists
D.                 strings

24. Which of the following name does not relate to stacks?

A.                 FIFO lists
B.                 LIFO list
C.                  Pile
D.                 Push-down lists


25.
Which of the following data structure is linear data structure?

A.                 Trees
B.                 Graphs
C.                  Array
D.                 None of above

 

26. Attribute of one table matching to the primary key of other table, is called as

A.                 foreign key
B.                 secondary key
C.                  candidate key
D.                 composite key

27. Ascending order of data hierarchy is

A.                 bit->byte->record->field->file->database
B.                 bit->byte->field->record->file->database
C.                  byte->bit->field->record->file->database
D.                 byte->bit->field->file->record->database

28. Data dictionary is a special file that contains

A.                 the names of all fields in all files
B.                 the data types of all fields of all files
C.                  Both of above
D.                 None of above

 

29. Which of following the problem of thrashing is significantly affected?

A.                 program size
B.                 program structure
C.                  primary storage
D.                 secondary storage

30. Which of following need a device driver

A.                 Cache
B.                 Disk
C.                  Main Memory
D.                 Registers

31. Which of following is not an advantage of multiprogramming?

A.                 increased throughput
B.                 shorter response time
C.                  ability to assign priorities of jobs
D.                 decreased system overload

32. Which of the following memory allocation scheme is subject to external fragmentation?

A.                 Segmentation
B.                 Swapping
C.                  Demand Paging
D.                 Multiple Contiguous Fixed Partition 

 

33. Spooling is most beneficial where

A.                 Jobs are I/O bound
B.                 Jobs are CPU bound
C.                  Jobs are evenly divided as I/O bound and CPU bound
D.                 All of above

34. In which of the following usually a front end processor is used?

A.                 Virtual storage
B.                 Timesharing
C.                  Multiprogramming
D.                 Multithreading

 

35. Banker's algorithm for resource allocation deals with?

A.                 deadlock prevention
B.                 deadlock avoidance
C.                  deadlock recovery
D.                 circular wait

 

36. Which scheduling policy is most suitable for time shared operating system?

A.                 Shortest job first
B.                 FCFS
C.                  LCFS
D.                 Round robin

37. Belady anomaly occurs in?

A.                 LIFO
B.                 FIFO
C.                  LRU
D.                 NRU

38. What is a page fault?

A.                 is an spelling error in a page in memory
B.                 reference to a page which is in another program
C.                  is an access to a page not currently in memory
D.                 always occurs whenever a page is accessed from memory

39. Break statement is used for

A.                 Quit a program
B.                 Quit the current iteration
C.                  Both of above
D.                 None of above

 

40. Continue statement used for

A.                 To continue to the next line of code
B.                 To stop the current iteration and begin the next iteration from the beginning
C.                  To handle run time error
D.                 None of above

41. What will be output of
void main()
{
char test =`S`;
printf("\n%c",test);
}

A.                 S
B.                 Error
C.                  Garbage value
D.                 None of above

 

42. What will be the output of following program
main(){
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}

A.                 error
B.                 0
C.                  10
D.                 Garbage value

 

43. Difference between calloc() and malloc()

A.                 calloc() takes a single argument while malloc() needs two arguments
B.                 malloc() takes a single argument while calloc() needs two arguments
C.                  malloc() initializes the allocated memory to ZERO
D.                 calloc() initializes the allocated memory to NULL

 

44. total number of keywords in C are

A.                 30
B.                 32
C.                  48
D.                 132

45. Which operator in c++ can't be overloaded

A.                 %
B.                 +
C.                  ::
D.                 -

46. Which operator has the highest priority

A.                 ()
B.                 []
C.                  *
D.                 /

47. Difference between structure and union is

A.                 We can define functions within structures but not within a union
B.                 We can define functions within union but not within a structure
C.                  The way memory is allocated
D.                 There is no difference


48.  printf() belongs to which library of c

A.                 stdlib.h
B.                 stdio.h
C.                  stdout.h
D.                 stdoutput.h

 

49. All members of class have which DEFAULT access to its members

A.                 private
B.                 public
C.                  protected
D.                 depends

50. Constructor is

A.                 A class automatically called whenever a new object of this class is created
B.                 A class automatically called whenever a new object of this class is destroyed
C.                  A function automatically called whenever a new object of this class is created
D.                 A function automatically called whenever a new object of this class is destroyed

51. Which of the following cannot be inherited from the base class

A.                 Constructor
B.                 Friend
C.                  Both A and B cannot be inherited
D.                 Both A and B can be inherited

52. What is the value of sizeof(char)

A.                 1
B.                 2
C.                  4
D.                 8

53. Which arithmetic operation can be done in pointer

A.                 Multiplication
B.                 Division
C.                  Addition
D.                 None of above

54. What is inheritance

A.                 Inheritance allows one class to reuse the state and behavior of another class.
B.                 It deals with dangling pointers
C.                  It deals with void pointers
D.                 It is type of class declaration

55. What is abstract class

A.                 Whose objects can’t be created
B.                 Whose objects can be created
C.                  Depends on class
D.                 None of above

56. What is polymorphism

A.                 Ability to take more than one form
B.                 Ability to destroy destructor
C.                  Ability to create constructor
D.                 None of above

57. OSI reference model has how many layers

A.                 4
B.                 5
C.                  7
D.                 3

58. Framing is done on which layer

A.                 Datalink Layer
B.                 Physical Layer
C.                  Transport Layer
D.                 Application Layer

 

59. Which layer deals with Flow control

A.                 Session Layer
B.                 Network Layer
C.                  Transport Layer
D.                 Application Layer

60. MAC address is of how many bits

A.                 24 bit
B.                 32 bit
C.                  48 bit

D.                 128 bit

Search Aptipedia