Thursday, April 30, 2009

Java Fundamental-I

1. How could Java classes direct program messages to the system console, but error messages, say to a file?

The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:

Stream st =

new Stream (new

FileOutputStream ("techinterviews_com.txt"));

System.setErr(st);

System.setOut(st);


2. What’s the difference between an interface and an abstract class?

An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.


3. Why would you use a synchronized block vs. synchronized method?

Synchronized blocks place locks for shorter periods than synchronized methods.


4. Explain the usage of the keyword transient?

This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).


5. How can you force garbage collection?

You can’t force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.


6. How do you know if an explicit object casting is needed?

If you assign a superclass object to a variable of a subclass’s data type, you need to do explicit casting. For example:

Object a;Customer b; b = (Customer) a;

When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.


7. What’s the difference between the methods sleep() and wait()

The code sleep(1000); puts thread aside for exactly one second. The code wait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.


8. Can you write a Java class that could be used both as an applet as well as an application?

Yes. Add a main() method to the applet.


9. What’s the difference between constructors and other methods?

Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.



10. Can you call one constructor from another if a class has multiple constructors

Yes. Use this() syntax.


11. Explain the usage of Java packages.

This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.


12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?

You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let’s say a class Employee belongs to a package com.xyz.hr; and is located in the file c:/dev/com.xyz.hr.Employee.java. In this case, you’d need to add c:/dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:

c:\>java com.xyz.hr.Employee


13. What’s the difference between J2SDK 1.5 and J2SDK 5.0?

There’s no difference, Sun Microsystems just re-branded this version.


14. What would you use to compare two String variables - the operator == or the method equals()?

I’d use the method equals() to compare the values of the Strings and the = = to check if two variables point at the same instance of a String object.


15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?

Yes, it does. The FileNoFoundException is inherited from the IOException. Exception’s subclasses have to be caught first.


16. Can an inner class declared inside of a method access local variables of this method?

It’s possible if these variables are final.


17. What can go wrong if you replace && with & in the following code:

String a=null;

if (a!=null && a.length()>10)

{...}

A single ampersand here would lead to a NullPointerException.


18. What’s the main difference between a Vector and an ArrayList

Java Vector class is internally synchronized and ArrayList is not.

Tuesday, April 21, 2009

Computer Network-I

1. What are the two types of transmission technology available?
(i) Broadcast and (ii) point-to-point

2. What is subnet?
A generic term for section of a large networks usually separated by a bridge or router.

3. Difference between the communication and transmission.
Transmission is a physical movement of information and concern issues like bit polarity, synchronisation, clock etc.
Communication means the meaning full exchange of information between two communication media.

4. What are the possible ways of data exchange?
(i) Simplex (ii) Half-duplex (iii) Full-duplex.

5. What is SAP?
Series of interface points that allow other computers to communicate with the other layers of network protocol stack.

6. What do you meant by "triple X" in Networks?
The function of PAD (Packet Assembler Disassembler) is described in a document known as X.3. The standard protocol has been defined between the terminal and the PAD, called X.28; another standard protocol exists between hte PAD and the network, called X.29. Together, these three recommendations are often called "triple X"

7. What is frame relay, in which layer it comes?
Frame relay is a packet switching technology. It will operate in the data link layer.

8. What is terminal emulation, in which layer it comes?
Telnet is also called as terminal emulation. It belongs to application layer.

9. What is Beaconing?
The process that allows a network to self-repair networks problems. The stations on the network notify the other stations on the ring when they are not receiving the transmissions. Beaconing is used in Token ring and FDDI networks.

10. What is redirector?
Redirector is software that intercepts file or prints I/O requests and translates them into network requests. This comes under presentation layer.

11. What is NETBIOS and NETBEUI?
NETBIOS is a programming interface that allows I/O requests to be sent to and received from a remote computer and it hides the networking hardware from applications.
NETBEUI is NetBIOS extended user interface. A transport protocol designed by microsoft and IBM for the use on small subnets.

12. What is RAID?
A method for providing fault tolerance by using multiple hard disk drives.

13. What is passive topology?
When the computers on the network simply listen and receive the signal, they are referred to as passive because they don’t amplify the signal in any way. Example for passive topology - linear bus.

14. What is Brouter?
Hybrid devices that combine the features of both bridges and routers.

15. What is cladding?
A layer of a glass surrounding the center fiber of glass inside a fiber-optic cable.

16. What is point-to-point protocol?
A communications protocol used to connect computers to remote networking services including Internet service providers.

17. How Gateway is different from Routers?
A gateway operates at the upper levels of the OSI model and translates information between two completely different network architectures or data formats

18. What is attenuation?
The degeneration of a signal over distance on a network cable is called attenuation.

19. What is MAC address?
The address for a device as it is identified at the Media Access Control (MAC) layer in the network architecture. MAC address is usually stored in ROM on the network adapter card and is unique.

20. Difference between bit rate and baud rate.
Bit rate is the number of bits transmitted during one second whereas baud rate refers to the number of signal units per second that are required to represent those bits.
baud rate = bit rate / N
where N is no-of-bits represented by each signal shift.

Monday, April 20, 2009

Operating System-I

1. What are the basic functions of an operating system? - Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.

2. Why paging is used? - Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available.

3. While running DOS on a PC, which command would be used to duplicate the entire diskette? Diskcopy

4. What resources are used when a thread created? How do they differ from those when a process is created? - When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads.

5. What is virtual memory? - Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used.

6. What is Throughput, Turnaround time, waiting time and Response time? - Throughput – number of processes that complete their execution per time unit. Turnaround time – amount of time to execute a particular process. Waiting time – amount of time a process has been waiting in the ready queue. Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment).

7. What is the state of the processor, when a process is waiting for some event to occur? - Waiting state

8. What is the important aspect of a real-time system or Mission Critical Systems? - A real time operating system has well defined fixed time constraints. Process must be done within the defined constraints or the system will fail. An example is the operating system for a flight control computer or an advanced jet airplane. Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Real-Time systems may be either hard or soft real-time. Hard real-time: Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM), Conflicts with time-sharing systems, not supported by general-purpose operating systems. Soft real-time: Limited utility in industrial control of robotics, Useful in applications (multimedia, virtual reality) requiring advanced operating-system features.

9. What is the difference between Hard and Soft real-time systems? - A hard real-time system guarantees that critical tasks complete on time. This goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it takes the operating system to finish any request made of it. A soft real time system where a critical real-time task gets priority over other tasks and retains that priority until it completes. As in hard real time systems kernel delays need to be bounded.

10. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem? - Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming.

11. What is multi tasking, multi programming, multi threading? - Multi programming: Multiprogramming is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. So the main idea here is that the CPU is never idle. Multi tasking: Multitasking is the logical extension of multiprogramming .The concept of multitasking is quite similar to multiprogramming but difference is that the switching between jobs occurs so frequently that the users can interact with each program while it is running. This concept is also known as time-sharing systems. A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of time-shared system. Multi threading: An application typically is implemented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tasks for example a web server accepts client requests for web pages, images, sound, and so forth. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process, it would be able to service only one client at a time. The amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. This approach would multithread the web-server process, the server would create a separate thread that would listen for client requests when a request was made rather than creating another process it would create another thread to service the request. To get the advantages like responsiveness, Resource sharing economy and utilization of multiprocessor architectures multithreading concept can be used.
12. What is hard disk and what is its purpose? - Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data on the magnetic medium of the disk.Hard disks have a hard platter that holds the magnetic medium, the magnetic medium can be easily erased and rewritten, and a typical desktop machine will have a hard disk with a capacity of between 10 and 40 gigabytes. Data is stored onto the disk in the form of files.

13. What is fragmentation? Different types of fragmentation? - Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request. External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being use.

Tuesday, April 14, 2009

Computer Network: MCQ

1. If a computer on the network shares resources for others to use, it is called ____
a. Server
b. Client
c. Mainframe
d. PC
Answer : a

2. Terminators are used in ______ topology.
a. Bus
b. Star
c. Mesh
d. Ring
Answer : a

3. In _____ topology, if a computer’s network cable is broken, whole network goes down.
a. Bus
b. Star
c. Mesh
d. Ring
Answer : a

4. For large networks, _______ topology is used.
a. Bus
b. Star
c. Ring
d. Tree
Answer : b

5. ISO stands for
a. International Standard Organization
b. International Student Organization
c. Integrated Services Organization
d. Indian Standard Organisation
Answer : a

6. ISO OSI model is used in
a. Stand alone PC
b. Network environment
c. Mini Computer
d. Mainframe
Answer : b

7. Network cable lies on _____ layer
a. Application
b. Network
c. Physical
d. Transport
Answer : c

8. ____ layer decides which physical pathway the data should take.
a. Application
b. Network
c. Physical
d. Session
Answer : c

9. ISDN is an example of ______ network
a. Circuit switched
b. Packet switched
c. Message Switched
d. Virtual Circuit Switched
Answer : a

10. X.25 is an example of ______ network
a. Circuit switched
b. Packet switched
c. Message Switched
d. Virtual Circuit Switched
Answer : b

11. _____________ allows LAN users to share computer programs and data.
a. Communication server
b. Print server
c. File server
d. Client-Server
Answer : c

12. Print server uses ________ which is a buffer that holds data before it is send to the printer.
a. Queue
b. Spool
c. Node
d. Host
Answer : b

13. A standalone program that has been modified to work on a LAN by including concurrency controls such as file and record locking is an example of____
a. LAN intrinsic software
b. LAN aware software
c. Groupware
d. LAN ignorant software
Answer : a

14. The ______ portion of LAN management software restricts access, records user activities and audit data etc.
a. Configuration management
b. Security management
c. Performance management
d. Authentication Management
Answer : b

15. What is the max cable length of STP?
a. 100 ft
b. 200 ft
c. 100 m
d. 200 m
Answer : d

16. What is the max data capacity of STP?
a. 10 mbps
b. 100 mbps
c. 1000 mbps
d. 10000 mbps
Answer : b

17. Which connector STP uses?
a. BNC
b. RJ-11
c. RJ-45
d. RJ-69
Answer : c

18. What is the central device in star topology?
a. STP server
b. Hub/switch
c. PDC
d. Router
Answer : b

19. What is max data capacity for optical fiber cable?
a. 10 mbps
b. 100 mbps
c. 1000 mbps
d. 10000 mbps
Answer : c

20. Which of the following architecture uses CSMA/CD access method?
a. ARCnet
b. Ethernet
c. ARPAnet
d. Sancharnet
Answer : b
______________________________________________________________________________________________

IT Fundamentals

1. All of the following are examples of real security and privacy risks EXCEPT:
A. hackers.
B. spam.
C. viruses.
D. identity theft.
Answer: B

2. A process known as ____________ is used by large retailers to study trends.
A. data mining
B. data selection
C. POS
D. data conversion
Answer: A

3. ____________terminals (formerly known as cash registers) are often connected to complex inventory and sales computer systems.
A. Data
B. Point-of-sale (POS)
C. Sales
D. Query
Answer: B

4. A(n) ____________ system is a small, wireless handheld computer that scans an item’s tag and pulls up the current price (and any special offers) as you shop.
A. PSS
B. POS
C. inventory
D. data mining
Answer: A

5. The ability to recover and read deleted or damaged files from a criminal’s computer is an example of a law enforcement specialty called:
A. robotics.
B. simulation.
C. computer forensics.
D. animation.
Answer: C

6. Which of the following is NOT one of the four major data processing functions of a computer?
A. gathering data
B. processing data into information
C. analyzing the data or information
D. storing the data or information
Answer: C

7. ____________ tags, when placed on an animal, can be used to record and track in a database all of the animal’s movements.
A. POS
B. RFID
C. PPS
D. GPS
Answer: B

8. Surgeons can perform delicate operations by manipulating devices through computers instead of manually. This technology is known as:
A. robotics.
B. computer forensics.
C. simulation.
D. forecasting.
Answer: A

9. Technology no longer protected by copyright, available to everyone, is considered to be:
A. proprietary.
B. open.
C. experimental.
D. in the public domain.
Answer: A

10. ____________ is the study of molecules and structures whose size ranges from 1 to 100 nanometers.
A. Nanoscience
B. Microelectrodes
C. Computer forensics
D. Artificial intelligence
Answer: A

11. ____________ is the science that attempts to produce machines that display the same type of intelligence that humans do.
A. Nanoscience
B. Nanotechnology
C. Simulation
D. Artificial intelligence (AI)
Answer: D

12. ____________ is data that has been organized or presented in a meaningful fashion.
A. A process
B. Software
C. Storage
D. Information
Answer: D

13. The name for the way that computers manipulate data into information is called:
A. programming.
B. processing.
C. storing.
D. organizing.
Answer: B

14. Computers gather data, which means that they allow users to ____________ data.
A. present
B. input
C. output
D. store
Answer: B

15. After a picture has been taken with a digital camera and processed appropriately, the actual print of the picture is considered:
A. data.
B. output.
C. input.
D. the process.
Answer: B

16. Computers use the ____________ language to process data.
A. processing
B. kilobyte
C. binary
D. representational
Answer:

17. Computers process data into information by working exclusively with:
A. multimedia.
B. words.
C. characters.
D. numbers.
Answer:

18. In the binary language each letter of the alphabet, each number and each special character is made up of a unique combination of:
A. eight bytes.
B. eight kilobytes.
C. eight characters.
D. eight bits.
Answer: D

19. The term bit is short for:
A. megabyte.
B. binary language.
C. binary digit.
D. binary number.
Answer: C

20. A string of eight 0s and 1s is called a:
A. megabyte.
B. byte.
C. kilobyte.
D. gigabyte.
Answer:

21. A ____________ is approximately one billion bytes.
A. kilobyte
B. bit
C. gigabyte
D. megabyte
Answer: C

22. A ____________ is approximately a million bytes.
A. gigabyte
B. kilobyte
C. megabyte
D. terabyte
Answer: C

23. ____________ is any part of the computer that you can physically touch.
A. Hardware
B. A device
C. A peripheral
D. An application
Answer: A

24. The components that process data are located in the:
A. input devices.
B. output devices.
C. system unit.
D. storage component.
Answer: C

25. All of the following are examples of input devices EXCEPT a:
A. scanner.
B. mouse.
C. keyboard.
D. printer.
Answer: D

26. Which of the following is an example of an input device?
A. scanner
B. speaker
C. CD
D. printer
Answer: A

27. All of the following are examples of storage devices EXCEPT:
A. hard disk drives.
B. printers.
C. floppy disk drives.
D. CD drives.
Answer: B

28. The ____________, also called the “brains� of the computer, is responsible for processing data.
A. motherboard
B. memory
C. RAM
D. central processing unit (CPU)
Answer: D

29. The CPU and memory are located on the:
A. expansion board.
B. motherboard.
C. storage device.
D. output device.
Answer: B

30. Word processing, spreadsheet, and photo-editing are examples of:
A. application software.
B. system software.
C. operating system software.
D. platform software.
Answer:

31. ____________ is a set of computer programs used on a computer to help perform tasks.
A. An instruction
B. Software
C. Memory
D. A processor
Answer: B

32. System software is the set of programs that enables your computer’s hardware devices and ____________ software to work together.
A. management
B. processing
C. utility
D. application
Answer: D

33. The PC (personal computer) and the Apple Macintosh are examples of two different:
A. platforms.
B. applications.
C. programs.
D. storage devices.
Answer: A

34. Apple Macintoshes (Macs) and PCs use different ____________ to process data and different operating systems.
A. languages
B. methods
C. CPUs
D. storage devices
Answer: C

35. Servers are computers that provide resources to other computers connected to a:
A. network.
B. mainframe.
C. supercomputer.
D. client.
Answer: A

36. Smaller and less expensive PC-based servers are replacing ____________ in many businesses.
A. supercomputers
B. clients
C. laptops
D. mainframes
Answer: D

37. ____________ are specially designed computers that perform complex calculations extremely rapidly.
A. Servers
B. Supercomputers
C. Laptops
D. Mainframes
Answer: B

38. DSL is an example of a(n) ____________ connection.
A. network
B. wireless
C. slow
D. broadband
Answer: D

39. The difference between people with access to computers and the Internet and those without this access is known as the:
A. digital divide.
B. Internet divide.
C. Web divide.
D. broadband divide.
Answer: A

40. ____________ is the science revolving around the use of nanostructures to build devices on an extremely small scale.
A. Nanotechnology
B. Micro-technology
C. Computer forensics
D. Artificial intelligence
Answer: A

41. Which of the following is the correct order of the four major functions of a computer?
A. Process à Output à Input à Storage
B. Input à Outputà Process à Storage
C. Process à Storage à Input à Output
D. Input à Process à Output à Storage
Answer:

42. ____________ bits equal one byte.
A. Eight
B. Two
C. One thousand
D. One million
Answer: A

43. The binary language consists of ____________ digit(s).
A. 8
B. 2
C. 1,000
D. 1
Answer:

44. A byte can hold one ____________ of data.
A. bit
B. binary digit
C. character
D. kilobyte
Answer: C

45. ____________ controls the way in which the computer system functions and provides a means by which users can interact with the computer.
A. The platform
B. The operating system
C. Application software
D. The motherboard
Answer: B

46. The operating system is the most common type of ____________ software.
A. communication
B. application
C. system
D. word-processing software
Answer: C

47. ____________ are specially designed computer chips that reside inside other devices, such as your car or your electronic thermostat.
A. Servers
B. Embedded computers
C. Robotic computers
D. Mainframes
Answer: B

48. The steps and tasks needed to process data, such as responses to questions or clicking an icon, are called:
A. instructions.
B. the operating system.
C. application software.
D. the system unit.
Answer: A

49. The two broad categories of software are:
A. word processing and spreadsheet.
B. transaction and application.
C. Windows and Mac OS.
D. system and application.
Answer: D

50. The metal or plastic case that holds all the physical parts of the computer is the:
A. system unit.
B. CPU.
C. mainframe.
D. platform.
Answer: A
________________________________________________________________________________________________

Monday, April 13, 2009

IT Fundamental

1. Which of the following is not used in First Generation Computers?
a. Vacuum tubes
b. Cards
c. Punch tapes
d. Magnetic cores

2. Which of the following is not associated with Second Generation Computers?
a. High level language
b. Operating system
c. Vacuum tubes
d. Transistor

3. Which of the following is true for the ENIAC machine?
a. Developed by Charles Babbage
b. Worked with stored programs
c. Used Vacuum tubes
d. Used electro-magnetic relays

4. The ALU is a part of
a. Operating system
b. CPU
c. ROM
d. None of these

5. Turbo C++ is a/an
a. Application software
b. Compiler
c. Interpreter
d. None of these

6. PARAM is a
a. Mini computer
b. Main-frame computer
c. Super computer
d. None of these

7. Digitization of continuous data is not necessary in
a. Mini computer
b. Main-frame computer
c. Super computer
d. Analog computer

8. Which of the following is not application software?
a. MS Word
b. PageMaker
c. Windows XP
d. Pro-Engineer

9. Which of the following is not a system file of MS DOS?
a. io.sys
b. msdos.sys
c. command.com
d. config.sys

10. A digital computer
a. Stores integer numbers in binary mode
b. Is less accurate than the analog computer
c. Can not store relation between continuous variables in the form of equations
d. All of these

11. Secondary storage of the computer is used for storing
a. Data only during the period when they are being processed by the CPU
b. Bilk data used by application programs
c. The operating system
d. All of these

12. Compared to secondary storage, primary storage is
a. Inexpensive but slow
b. Inexpensive but fast
c. Expensive and slow
d. Expensive but fast

13. The CPU performs read/write operations in
a. ROM
b. PROM
c. EPROM
d. RAM

14. The most popular secondary storage is
a. Magnetic tape
b. Magnetic core
c. Disk drive
d. RAM

15. Which of the following is volatile in nature?
a. ROM
b. RAM
c. PROM
d. All of these

16. Which of the following can be programmed only once?
a. ROM
b. PROM
c. EPROM
d. RAM

17. Disk drives are devices for
a. Sequential access of data
b. Overwriting of old data for storing new data
c. Faster data access as compared to magnetic tapes
d. All of these

18. Which of the following is most convenient for evaluating answer book with multiple choice questions?
a. MICR
b. OCR
c. OMR
d. Card reader

19. Which of the following produces best quality of printouts?
a. Dot-matrix Printer
b. Daisy-wheel Printer
c. Ink Jet Printer
d. Laser Printer

20. The primary memory of a personal computer consists of
a. ROM only
b. RAM only
c. ROM and RAM
d. ROM, RAM and Operating system

21. Different components of a computer are linked together by electrical conductors known as
a. Conductors
b. Buses
c. Connectors
d. Connecting leads

22. Which of the following converts digital signal into analog and analog signals to digital?
a. Fibre optic
b. Operating system
c. Modem
d. RAM

23. Conversion of analog signals to digital is known as
a. Modulation
b. Demodulation
c. Synchronization
d. Digitization

24. Half-duplex is a communication mode that facilitates data traffic
a. Always in one direction only
b. In one direction only, but the direction of data transfer can be set by the user
c. In both directions
d. In both directions but only in one direction at a time

25. A communication device that facilitates transmission from several input/output devices to a single line is known as a
a. Modifier
b. Modulator
c. Multiplexer
d. Duplex-system

26. A byte consists of
a. 2 bits
b. 8 bits
c. 32 bits
d. 1024 bits

27. Mode of communication in which data are transmitted in both directions, but not at the same time is known as
a. Simplex mode
b. Half-duplex mode
c. Full-duplex mode
d. None of these

28. The C compiler is
a. Part of the Operating system
b. A language translator
c. An interpreter
d. An application software

29. Which type of software facilitates creating, editing and printing of documents?
a. Word processing
b. Spreadsheets
c. Unix
d. Database management

30. Which of the following will convert instructions in a C program into the machine language?
a. System software
b. Operating system
c. Compiler
d. Interpreter

31. Instructions in a C program can be executed only when the program is
a. Assembled
b. Compiled
c. Assembled and Compiler
d. Compiled and linked with the library

32. A tuple in a database refers to a
a. Record
b. Field
c. File
d. Data item

33. A network model of database is useful as it
a. Facilitates physical representation of data
b. Allows one to many relationship
c. Easy to understand
d. Easy to store in a relational database

34. Which of the following is not true for a database system?
a. Eliminate data redundancy
b. Maintain data integrity
c. Allow to view and edit al files
d. Establish relation amongst records in the database

35. Programming language used in Database Management System is
a. C language
b. Query language
c. Cobol
d. None of these

36. The records of all activities in a specific period of time that requires updating the database is known as
a. Query report
b. Transaction file
c. Data manipulation file
d. Update file

37. Data items grouped together for storage in a file are called
a. Record
b. List
c. Grouped data
d. String

38. Which of the following is not a valid Dos command?
a. dir
b. dir>dfile
c. dir>>myfile
d. dir!

39. Which of the following is an external Dos command?
a. type
b. print
c. copy
d. format

40. What does command copy *.* a: do?
a. Copies all files in the working directory to floppy disk a:
b. Copies all files in the working directory and its sub-directories to floppy disk a:
c. Copies all files in c: drive to floppy disk a:
d. The command is illegal

41. Which of the following commands will delete a file named students.dat?
a. delete student.dat
b. del student.dat
c. remove student.dat
d. erase student.dat

42. Which of the following Boolean expressions is incorrect?
a. A+A’=1
b. A+0=A
c. A.1=A
d. AA’=1

43. According to Commutative law of Boolean algebra
a. X+Y=Y+X
b. X+(Y+Z)=(X+Y)+Z
c. X(Y.Z)=(X.Y)Z
d. X(Y+Z)=(XY)+(XZ)

44. Which of the following is correct Boolean expression?
a. X’.Y’+X.Y’+X.Y=Y+XY
b. X’.Y’+X.Y’+X.Y=Y’+XY
c. X’.Y’+X.Y’+X.Y=Y’+X’Y’
d. X’.Y’+X.Y’+X.Y=Y+X’Y’

45. What will be the output of the following logic circuit?



a. Q=A+B
b. Q=AB
c. Q=AB’
d. Q=A’+B’

46. Decimal number 136, in octal mode, is equivalent to
a. 209
b. 210
c. 211
d. 212

47. Which of the following is not a valid hexadecimal number?
a. 1AB
b. 2BC
c. 3FG
d. None of these

48. Decimal number 0.12 in octal mode is equivalent to
a. 0.375
b. 0.281
c. 0.015
d. None of these

49. Binary number 1110 is equivalent to 16 in
a. Octal system
b. Decimal system
c. Hexadecimal system
d. None of these

50. Which of the following does not form a part of Windows XP start menu?
a. Programs
b. Settings
c. Run
d. Edit

51. What happens when a user double clicks on the icon marked My Computer on desktop?
a. Icons for hard disk drives appear in a new window
b. Icons for hard disk and floppy disk drives appear in a new window
c. Icons for hard disk drives, floppy disk drives and CD ROM drives appear in a new window
d. Icons for installed programs appear in a new window

52. When a user deletes a file from the hard disk?
a. It is permanently erased from memory
b. It goes to the recycle bin and be retrieved at any time later
c. It goes to recycle bin and can be retrieved if the recycle bin has not been emptied
d. Any of the above can happen and the user has no control over it

53. Which of the following is not a tab in the menu bar of MS Word?
a. File
b. Edit
c. Format
d. Save

54. What value will the following C statement assign to integer variable k?
K = (5+3/2*2)*(5%3)
a. 10
b. 14
c. 4
d. None of these

55. Which of the following is not a key word in C?
a. default
b. break
c. file
d. switch

56. Suppose x and y have been declared as integer variables. Which of the following statement/s is/are illegal for reading values of x and y?
a. scanf(“%d,%d”,&x,&y)
b. scanf(“%d%d”,&x,&y)
c. scanf(“%d%d,&x;&y”)
d. scanf(“%d-%d”,&x,&y)

57. Suppose variables x and y hae been declared as integer and assigned respective values of 10 and 12. What output will the following statement give?
printf(“%d,%d,%X,%x\n”,x,y,x,y);
a. 10,12,10,12
b. 10,12,A,c
c. 10,12a,C
d. Statement is illegal

58. Which of the following is/are not valid C operand/operands?
a. 31stDecember
b. December31
c. _December31
d. _31stDecember

59. Which of the following is not valid format strings in C?
a. “%ud”
b. “%ux”
c. “%uo”
d. “%xd”

60. Suppose a has been declared as an integer variable and is assigned a value of 5. What output will the following statement give?
printf(“%d %d\n”,a++,++a);
a. 5,5
b. 5,6
c. 6,6
d. None of these

61. What will be the output of the following program?
if(‘A’)
printf(“abc”);
else
printf(“def”);
printf(“ghi\n”);
a. abc
b. def
c. defghi
d. abcghi

62. What will be the output of the following code if integer variables k and p are declared and initialized with values of 1 and 3, respectively?
int k=1;
int P=3;
switch(k)
{
case 1:
printf(“P”);
case 2:
printf(“P*P ”);
a. 3
b. 3 9
c. P
d. P P*P

63. What will be the output of the following code?
int p=3;
printf(“%d”,(p<3)?5/2:(int)’A’); a. 2 b. 2.5 c. A d. 65 64. The following function is written to evaluate the cube root of a real number. Identify the errors in the following code. Assume that header file is included
cuberoot(float x)
{
crx=pow(x,13);
return(cr);
}
a. It does not specify the return type
b. Variable crx has been used without being declared
c. To evaluate cube root of x, function pow() should be invoked as pow(x,1.0.3.0)
d. All of these

65. What will be the output of the following code?
char nextChar(char c)
{
return(c+1);
}
void main()
{
int i;
char ch=’P’;
for(i=0;i<5;i++) printf(“%c “, nextChar(ch)); } a. P Q R S T b. Q Q Q Q Q c. Q R S T U d. None of these 66. Which of the following are valid declarations of an array of integer numbers? Assume M has been declared as an integer variable and assigned a value of 10 a. int x[] b. int y[10] c. int z[M] d. All of these 67. In which header file is function exit() defined? a. stdio.h b. stdlib.h c. conio.h d. None of these 68. What will be the output of the following code? int x[10]={1,4,9,16,25}; printf(“%d\n”,x[3]); a. 9 b. 16 c. The code is illegal. The array should be declared as int x[]={1,4,9,16,25} d. The code illegal. The array should be declared as int x[5]={ 1,4,9,16,25}; 69. Which of the following declarations is/are illegal? a. int x[][]={{1,2,3},{3,4,5}} b. int y [2][3] ={{1,2,3},{3,4,5}} c. int z[][3] ={{1,2,3},{3,4,5}} d. int z[2][] ={{1,2,3},{3,4,5}} 70. Examine the following program #include
#include
double x;
void main()
{
int y;
for(x=y;x<5;x++) { double z; z=sqrt(x); printf(“Square root of %f is %f\n”,x,z); } } Which of the following is true? a. x and y are global variable b. y is a block variable c. x,y and z are auto variables d. All of these 71. A static variable has a. Local scope and visibility b. Local scope and global visibility c. Global scope and visibility d. Global scope and local visibility 72. For storage of a variable declared as float, one needs a. 2 bytes b. 4 bytes c. 6 bytes d. 8 bytes 73. What will be the output of the following code? enum size{ SMALL, MEDIUM, BIG} size mychoice=MEDIUM; printf(“%d\n”, mychoice==1); a. MEDIUM b. mychoice=MEDIUM c. 1 d. mychoice=1 74. Which of the following is/are valid escape sequence in C? a. ‘\a’ b. ‘\\’ c. ‘\t’ d. All of these 75. By default all variables in C are a. auto b. static c. external d. None of these 76. What will be the output of the following program? #include
#include
void main()
{
char str1[10]={“uvw”};
char str2[10]={“xyz”};
printf(“%s %s %s\n”,strcat(str1,str2),str1,str2);
}
a. uvw xyz uvw xyz
b. uvwxyz uvw xyz
c. uvwxyz uvwxyz xyz
d. None of these

77. What will be the output of the following program?
#include
#define RECIPROCAL(x)1/(float)x
void main()
{
printf(“%f\n”,RECIPROCAL(4+1));
}
a. 0.2
b. 1.25
c. 0
d. None of these

78. Which of the function will convert string str into uppercase?
a. toupper(str)
b. strupr(str)
c. upper(str)
d. stringupr(str)

79. A structure rectangle is defined with two data members length and breadth. If R is a structure of type Rectangle, its length can be accessed as
a. R.length
b. R->length
c. length.R
d. length->R

80. A structure Circle is defined with float variable radius as its only data member. The following code assigns values to data member radius of circle C and defines a pointer variable ptr to point to the address of Circle C
Circle C;
C.radius=5;
Circle *ptr;
ptr=&c;
The radius of the circle can be accessed by the following code
a. ptr.radius
b. ptr->radius
c. C->radius
d. C.radius

81. Suppose a pointer variable ptr is declared as int *p; the following code allocates memory for storing an integer number at address p
a. p=malloc(2)
b. p=(int*)malloc(2)
c. p=malloc(sizeof(int))
d. p=(int*)malloc(sizeof(int))

82. Function fopen() returns
a. void
b. 0 if successful and non zero integer number otherwise
c. A pointer to the file opened
d. None of these

83. Suppose it is required to write a string pointed to by pointer str to a file whose pointer is fptr. The following will write the string to the file
a. fputs(fptr,str)
b. puts(str,fptr)
c. fputs(str,fptr)
d. None of these

84. Function prototype of function fseek() is
a. void fseek(FILE*fp, int offset, int whence)
b. void fseek(FILE*fp, long offset, int whence)
c. int fseek(FILE*fp, int offset, int whence)
d. int fseek(FILE*fp, long offset, int whence)

85. Function fwrite() returns
a. Number of characters written to a file
b. Number of records written to a file
c. Number of bytes written to a stream
d. Does not return anything. It is a void function

86. What will be the output of the following code?
char str[]=”pqrst”;
cout<<<<<14.4567352<
a. pqr 14.4567352
b. pqr 14.4567
c. pqrst 14.46
d. pqrst 14.4567352

87. Statement coud<<<234 requires the following header files to be included
a. iostream.h
b. iostream.h and stdio.h
c. iostram.h and iomanip.h
d. stdio.h, stdlib.h and iostram.h

88. Bydefault, data members of a class are
a. private
b. protected
c. public
d. There is no default. All data members are to be explicitly declared as private, protected or public

89. Which of the following is true?
a. Constructor function of a class has a name same as a class name
b. Constructor of the class is automatically invoked when an object of the class is created
c. Constructor function can not return a value
d. Every class must have a constructor

90. Which of the following is true?
a. A C++ class can have more than one constructor
b. A C++ class can have more than one function with the same name
c. A class can be defined with default function argument
d. All member functions of a class, bydefault, are private



Solutions:

1. (d) 2.(c) 3.(c) 4.(b) 5.(b)

6.(c) 7.(d) 8.(c) 9.(d) 10.(a)

11.(b) 12.(d) 13.(d) 14.(c) 15.(b)

16.(a) 17.(d) 18.(c) 19.(d) 20.(c)

21.(b) 22.(c) 23.(a) 24.(d) 25.(c)

26.(b) 27.(b) 28.(b) 29.(a) 30.(c)

31.(d) 32.(a) 33.(b) 34.(c) 35.(b)

36.(b) 37.(a) 38.(d) 39.(b) 40.(a)

41.(a) 42.(d) 43.(a) 44.(b) 45.(c)

46.(b) 47.(c) 48.(d) 49.(a) 50.(d)

51.(c) 52.(c) 53.(d) 54.(b) 55.(c)



56.(c) 57.(b) 58.(a) 59.(d) 60.(c)

61.(c) 62.(d) 63.(d) 64.(d) 65.(b)

66.(a) & (b) 67.(b) 68.(b) 69.(a) & (d) 70.(b) & (c)

71.(d) 72.(b) 73.(c) 74.(d) 75.(a)

76.(c) 77.(b) 78.(b) 79.(a) 80.(b) & (d)

81.(b) & (c) 82.(d) 83.(c) 84.(d) 85.(c)

86.(c) 87.(c) 88.(a) 89.(a),(b) & (c) 90.(a),(b) & (c)

Friday, April 10, 2009

Data Communication-II

1. The Internet model consists of ________ layers.
a. Three
b. Five
c. Seven
d. Eight

2. The process-to-process delivery of the entire message is the responsibility of the ________ layer.
a. Network
b. Transport
c. Application
d. Physical

3. The ________ layer is the layer closest to the transmission medium.
a. Physical
b. Data link
c. Network
d. Transport

4. Mail services are available to network users through the ______ layer.
a. Data link
b. Physical
c. Transport
d. Application

5. As the data packet moves from the lower to the upper layers, headers are _______
a. Added
b. Subtracted
c. Rearranged
d. Modified

6. As the data packet moves from the upper to the lower layers, headers are ________
a. Added
b. Removed
c. Rearranged
d. Modified

7. The ________ layer lies between the network layer and the application layer.
a. Physical
b. Data link
c. Transport
d. None of the above

8. Layer 2 lies between the physical layer and the ________ layer.
a. Network
b. Data link
c. Transport
d. None of the above

9. When data are transmitted from device A to device B, the header from A’s layer 4
is read by B’s ________ layer.
a. Physical
b. Transport
c. Application
d. None of the above

10. The ________ layer changes bits into electromagnetic signals.
a. Physical
b. Data link
c. Transport
d. None of the above

11. The physical layer is concerned with the transmission of _______ over the
physical medium.
a. Programs
b. Dialogs
c. Protocols
d. Bits

12. Which layer functions as a liaison between user support layers and network

support layers?
a. Network layer
b. Physical layer
c. Transport layer
d. Application layer

13. What is the main function of the transport layer?
a. Node-to-node delivery
b. Process-to-process delivery
c. Synchronization
d. Updating and maintenance of routing tables

14. Which of the following is an application layer service?
a. Remote log-in
b. File transfer and access
c. Mail service
d. All the above

Solution:

1.(a) 2.(b) 3.(a) 4.(d) 5.(a) 6.(b) 7.(c)

8.(a) 9.(b) 10.(a) 11.(d) 12.(c) 13.(b) 14.(d)

Data Communication-I

1. A network that spans a large city is known as a(n) ___________.
a. WAN
b. LAN
c. P2PN
d. MAN

2. The token ring network controls access to the network using ___________.
a. token passing
b. broadcast transmission
c. bus
d. facsimile technology

3. The environment in which most of the processing is done by the server is known as ___________.
a. client/server
b. peer-to-peer
c. EDI
d. file/server

4. One or more computers connected to a hub in a network are known as __________ topology.
a. bus
b. ring
c. star
d. mesh

5. The network type in which all computers have equal status is known as _____________.
a. client/server
b. communications link
c. peer-to-peer
d. LAN

6. Microwave transmission, fiber optics and twisted pairs are examples of ___________.
a. topologies
b. communication links
c. network devices
d. computer networks

7. Signals produced by a computer to be sent over to phone lines must be converted to ______________.
a. digital signals
b. analog signals
c. microwaves
d. radio waves

8. A network that has all nodes on a single cable is known as _______________.
a. bus
b. star
c. ring
d. mesh

9. Devices that transmit and receive satellite signals are known as ____________.
a. earth stations
b. tokens
c. workstations
d. servers

10. The physical layout of a LAN is known as ______________.
a. link
b. network
c. contention
d. topology

11. All of the following are examples of computer networks EXCEPT:
a. L2AN
b. P2PN
c. MAN
d. WAN

12. Which of the following is the most widely used packet switching protocol for WAN application?
a. Ethernet
b. X.25
c. T1
d. TCP/IP

13. Which term describes a computer that is connected to a network?
a. node
b. unit
c. device
d. terminal unit

14. What is the term used to describe the phenomenon when two computers try to send data at the same time using the same network?
a. contention
b. congestion
c. competition
d. communication

15. Which of the following is a WAN connection point that enables users to access the WAN using a local phone call?
a. POP
b. Leased line
c. PVC
d. ISDN

16. To connect to a LAN, a computer must be equipped with _______________.
a. backbone
b. network card
c. both a and b
d. none of the above

17. Which technology enables networks to transmit messages to their correct destination?
a. Packet switching
b. Circuit switching
c. Both a and b
d. None of the above

18. Two examples of ______________ are cable television lines and telephone lines.
a. communication channels
b. communication devices
c. sending devices
d. receiving devices

19. Internet transmissions usually use ______________.
a. Bluetooth
b. Ethernet
c. TCP/IP
d. broadcast transmission

20. Because of its larger size, most ___________ networks require a network administrator.
a. P2P
b. file/server
c. client/server
d. local

21. Sending and receiving devices include _________________.
a. tablet PCs, PDAs, and smart phones
b. mainframes computers and servers
c. desktop computers and notebook computers
d. all of the above

Search Aptipedia