Thursday, September 30, 2010

State Bank of India Exam Paper - Computer

रिडनडेंसी को परिभाषित कीजिए ।
उत्तर: एक ही डाटा को कई जगह पर सेव करना रिडनडेंसी कहलाता है ।

डाटा माइनिंग का क्या अर्थ है ?
उत्तर: ग्राहक के पास स्टोर किये गए डाटा का विश्लेषण करना डाटा माइनिंग कहलाता है ।

ग्राहक डाटाबेस में, ग्राहक का कुल नाम कहाँ डाला जाता है ?
उत्तर: टेक्स्ट फील्ड में

IP Address से क्या तात्पर्य है ?
उत्तर: इन्टरनेट पर प्रत्येक डिवाइस का एक यूनिक IP Address होता है । इसे इन्टरनेट एड्रेस भी कहते हैं । वह उसी तरह इसकी पहचान करना है जैसे गली का पता घर की पहचान करता है ।

क्लाइंट/सर्वर मॉडल में, क्लाइंट प्रोग्राम क्या करता है ?
उत्तर: सॉफ्टवेयर फाइलें दूसरे कम्प्यूटरों को सर्व करता है ।

Wednesday, September 15, 2010

Basic Computer Questions - Bank PO Exam

11. A(n)………contains commands that can be selected.
(A) pointer
(B) menu
(C) icon
(D) button
(E) None of these
Ans : (B)

12. An error is also known as—
(A) bug
(B) debug
(C) cursor
(D) icon
(E) None of these
Ans : (A)

13. Arithmetic Operations—
(A) involve matching one data item to another to determine if the first item is greater than, equal to, or less than the other item
(B) sort data items according to standard, predefined criteria in ascending order or descending order
(C) use conditions with operators such as AND, OR and NOT
(D) include addition, subtraction, multiplication and division
(E) None of these
Ans : (D)

14. Sending an e-mail is similar to—
(A) picturing an event
(B) narrating a story
(C) writing a letter
(D) creating a drawing
(E) None of these
Ans : (C)

15. Promotion in Marketing means—
(A) passing an examination
(B) elevation from one grade to another
(C) selling the products through various means
(D) selling the product in specific areas
(E) None of these
Ans : (C)

16. Microsoft Word is an example of—
(A) an operating system
(B) a processing device
(C) application software
(D) an input device
(E) None of these
Ans : (B)

17. Sources of Sales Leads are—
(A) Data Mining
(B) Market Research
(C) Media Outlets
(D) Promotional Programs
(E) All of these
Ans : (E)

18. Any data or instruction entered into the memory of a computer is considered as—
(A) storage
(B) output
(C) input
(D) information
(E) None of these
Ans : (A)

19. Which part of the computer displays the work done ?
(A) RAM
(B) printer
(C) monitor
(D) ROM
(E) None of these
Ans : (C)

20. Which is the part of a computer that one can touch and feel ?
(A) Hardware
(B) Software
(C) Programs
(D) Output
(E) None of these
Ans : (A)

Basic Questions of Computer Science for Bank Exam

1. A keyboard is this kind of device—
(A) black
(B) input
(C) output
(D) word Processing
(E) None of these
Ans : (B)

2. IT stands for—
(A) information Technology
(B) integrated Technology
(C) intelligent Technology
(D) interesting Technology
(E) None of these
Ans : (A)

3. Which of the following refers to the fastest, biggest and most expensive computers ?
(A) Personal Computers
(B) Supercomputers
(C) Laptops
(D) Notebooks
(E) None of these
Ans : (B)

4. A collection of related information sorted and dealt with as a unit is a—
(A) disk
(B) data
(C) file
(D) floppy
(E) None of these
Ans : (C)

5. The process of a computer receiving information from a server on the Internet is known as—
(A) pulling
(B) pushing
(C) downloading
(D) transferring
(E) None of these
Ans : (C)

6. Which part of the computer helps to store information ?
(A) Disk drive
(B) Keyboard
(C) Monitor
(D) Printer
(E) None of these
Ans : (A)

7. ………………is the process of carrying out commands.
(A) Fetching
(B) Storing
(C) Executing
(D) Decoding
(E) None of these
Ans : (C)

8. The role of a………generally is to determine a buyer’s needs and match it to the correct hardware and software.
(A) computer Scientist
(B) computer sales representative
(C) computer consultant
(D) corporate trainer
(E) None of these
Ans : (B)

9. Which of the following groups consist of only output devices ?
(A) Scanner, Printer, Monitor
(B) Keyboard, Printer, Monitor
(C) Mouse, Printer, Monitor
(D) Plotter, Printer, Monitor
(E) None of these
Ans : (D)

10. The rectangular area of the screen that displays a program, data, and/or information is a—
(A) title bar
(B) button
(C) dialog box
(D) window
(E) None of these
Ans : (D)

Tuesday, September 14, 2010

How to unblock a person in Orkut

You can unblock a user by following these steps:

1. Visit your home page and click the "lists" button under your photo.
2. Click the "view ignore-list" button.
3. Click the "remove(delete)" button next to the name of the person you would like to remove from your ignore list.

When you unblock an orkut member, you'll be able to receive messages, scraps, testimonials and invitations from them.

State Bank of India PO Exam - Computer Knowledge

1. The —- shows all the websites and pages that you have visited over a period of time.
(A) status bar
(B) task bar
(C) history list
(D) tool bar
(E) None of these
ANS (C)

2. A proxy server is used for the which of the following?
(A) To provide security against unauthorized users
(B) To process client requests for web pages
(C) To process client requests for database access
(D) To provide TCP/IP
(E) None of these
ANS (A)

3. A repair for a known software bug, usually available at no charge on the internet , is called a (n) —
(A) version
(B) Patch
(C) Tutorial
(D) FAQ
(E) None of these
ANS (B)

4. In the URL http://www.upscportal.com/, the portion labelled http is the —
(A) host
(B) domain name
(C) protocol
(D) top-level domain
(E) None of these
ANS (C)

5. Which of the following organizations has recently given a US$ 600 million loan to Power Grid Corporation of India , a Govt. run organization?
(A) Asian Development Bank
(B) World Bank
(C) International Monetary Fund
(D) Bank of America
(E) None of these
ANS (B)

6. The ability to easily add additional users means that a network is –
(A) Scalable
(B) dedicated
(C) Decentralized
(D) Secure
(E) None of these
ANS (A)

7. In a database , a field is a –
(A) lable
(B) table of information
(C) group of related records
(D) category of information
(E) None of these
ANS (C)

8. The number of pixels displayed on a screen is known as the screen–
(A) resolution
(B) colour depth
(C) refresh rate
(D) viewing size
(E) None of these
ANS (A)

8. Word processing , spreadsheet , and photo-editing are example of –
(A) application software
(B) system software
(C) operating system software
(D) platform software
(E) None of these
ANS (A)

9. If you wish to extend the length of the network without having the signal degrade, you would use a —
(A) repeater
(B) router
(C) gateway
(D) switch
(E) None of these
ANS (A)

10. A—- is approximately a million bytes.
(A) gigabyte
(B) kilobyte
(C) megabyte
(D) terabyte
(E) None of these
ANS (C)

11. The time it takes a device to locate data and instructions and make them available to CPU is known as –
(A) clock speed
(B) a processing cycle
(C) CPU speed
(D) access time
(E) None of these
ANS (D)

12. ——– controls the way in which the computer system functions and provides a means by which users are interact with the computer.
(A) The platform
(B) The operating system
(C) Application software
(D) The motherboard
(E) None of these
ANS (B)

13. ——– means that the data contained in a database is accurate and reliable.
(A) Data redundancy
(B) Data integrity
(C) Data reliability
(D) Data consistency
(E) None of these
ANS (B)

14. A(n) —— is a private corporate network, used exclusively by company employees.
(A) Internet
(B) local area network
(C) peer-to-peer
(D) intranet
(E) None of these
ANS (B)

15. A characteristic of a file server is which of the following?
(A) Manages file operations and is shared on a network
(B) Manages file operations and is limited to one PC
(C) Acts as fat client and is shared on a network
(D) Acts as fat client and is limited to one PC
(E) None of these
ANS (A)

Monday, September 13, 2010

TeamViewer

TeamViewer is a computer software package for remote control, desktop sharing, and file transfer between computers. This software operates with Microsoft Windows, Mac OS X[1][2], and Linux[3].This is able to function while the computers are protected by firewalls and NAT proxy.

TeamViewer connects to any PC or server around the world within a few seconds. You can remote control your partner's PC as if you were sitting right in front of it.
You can start with it. It's free with full version. Go to TeamViewer and download it.

Sunday, September 12, 2010

Some C++ Interview Questions

1. What do you mean by Stack unwinding ?

Ans: It is a process during exception handling when the destructor is called for all local objects between the place where the exception was thrown and where it is caught.

2. Define precondition and post-condition to a member function.

Ans: Precondition: A precondition is a condition that must be true on entry to a member function. A class is used correctly if preconditions are never false. An operation is not responsible for doing anything sensible if its precondition fails to hold. For example, the interface invariants of stack class say nothing about pushing yet another element on a stack that is already full. We say that isful() is a precondition of the push operation. Post-condition: A post-condition is a condition that must be true on exit from a member function if the precondition was valid on entry to that function. A class is implemented correctly if post-conditions are never false. For example, after pushing an element on the stack, we know that isempty() must necessarily hold. This is a post-condition of the push operation.

3. What is polymorphism?

Ans: Polymorphism is the idea that a base class can be inherited by several classes. A base class pointer can point to its child class and a base class array can store different child class objects.

4. How do you find out if a linked-list has an end? (i.e. the list is not a cycle)

Ans: You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. If that is the case, then you will know the linked-list is a cycle.

5. What is Boyce Codd Normal form ?

Ans: A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a->b, where a and b is a subset of R, at least one of the following holds:

Objective Type Computer Science Questions for Public Sector Recruitment Exam

1. The problem of fragmentation arises in
(a) static storage Allocation
(b) stack allocation of storage
(c) stack allocation with dynamic binding
(d) Heap allocation

Ans: (d)

2. The process of organizing the memory into two banks to allow 8 and 16-bit data operation is called

a. Bank Switching
b. Indexed Mapping
c. Two-way memory interleaving
d. Memory segmentation

Ans: (c)

3. Memory refreshing may be done

a. by the CPU that contains a special regress counter, only
b. by an external refresh controller, only
c. either by the CPU or by an external refresh controller
d. none of the above

Ans: (c)

4. The use of hardware in memory management is through segment relocation and protection is

a. to perform address translation to reduce size of the memory
b. to perform address translation to reduce execution time overhead
c. both (a) and (b)
d. none of the above

Ans: (c)

5. Thrashing occurs when

a. too much of the time is spent in waiting to swap between memory and disk
b. two processes try to access the same resource
c. the size of the data to be inserted is less than the size of a page in memory
d. the processor's mapping table discovers that the program is trying to use an address that doesn't currently exist

Ans: (a)

C++ Interview

1. What is an adaptor class or Wrapper class?
Ans: A class that has no functionality of its own. Its member functions hide the use of a third party software component or an object with the non-compatible interface or a non-object-oriented implementation.

2. What is a Null object?
Ans: It is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member function that is supposed to return an object with some specified properties but cannot find such an object.

3. What is class invariant?

Ans: A class invariant is a condition that defines all valid states for an object. It is a logical condition to ensure the correct working of a class. Class invariants must hold when an object is created, and they must be preserved under all operations of the class. In particular all class invariants are both preconditions and post-conditions for all operations or member functions of the class.

4. Differentiate between the message and method.
Ans:
Message:
* Objects communicate by sending messages to each other.
* A message is sent to invoke a method.

Method
* Provides response to a message.
* It is an implementation of an operation.

5. What is a dangling pointer?
Ans: A dangling pointer arises when you use the address of an object after
its lifetime is over. This may occur in situations like returning
addresses of the automatic variables from a function or using the
address of the memory block after it is freed.

Bank IT Officer Exam Papers

1. The model which provides a concrete expression of these concepts by means of two fundamental ideas — logical records and links, is called a

A. relationship model
B. network model
C. hicrachical model
D. none of the above

2. The network model has been established by

A. CODASYL committee
B. IBM
C. ECA
D. none of the above

3. A link may be defined as the representation of an

A. objects
B, programs
C. association
D. none of the above

4. DML is intended provide operations which ope- rate upon data stored in the

A, file
B. record
C. database
D. none of the above

5. In the hierarchical model a hierarchical schema is defined by a tree whose nodes are

A. database
B. logical record types
C. links
D. none of the above

6. The set of all values in the relations represents the contents of the

A. database
B. record file
C. table
D. none of the above

7. In hierarchical data model, the database is represented by

A. a directed graph
B. tree structures
C. relation
D, none of the above

8. A Database Management System (DBMS) is a software system capable of supporting and managing any number of independent

A. results
B. relations
c. none of the above

9. Support for data independence is arguably the most important feature of a

A system
B. database system
C. relation
D. none of the above

10. Distinct levels of data independence arc

A. two
B. three
C. four
D. none of the above

11. Database software may be divided into

A. four distinct categories
B. three distinct categories
C. two distinct categories
D. none of the above

12. Any large software project may be divided into several

A. project phases
B. sub projects
C. hardware
D. none of the above

13. Data modeling occupies an important position in the

A. database file
B. database life cycle
C. relation
D. none of the above

14. The term "software engineering" implies the application of scientific knowledge and discipline to the construction of

A. database record
B. computer hardware system
C. computer software system
D. none of the above

15. Program correctness has been a strong motivation for much of the work in software engineering and

A. high-level language programming
B. programming language design
C. Pascal
D. none of the above

ANS:
1. B

2. A

3. B

4. B

5. B


6. A

7. B

8. C

9. Do Yourselves

10. Do Yourselves

11. B

12. A

13. B

14. C

15. B

Saturday, September 11, 2010

C++ Interview Questions

1. What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

Ans: virtual

2. What do you mean by binding of data and functions?

Ans: Encapsulation.

3. What is the difference between an object and a class?

Ans: Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.

- A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.
- The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.

- An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.

4. What is a class ?

Ans: Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.

5. What is friend function ?

Ans: As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.

6. Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

Ans: Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in O(n log n) time.

7. What is abstraction?

Ans: Abstraction is of the process of hiding unwanted details from the user.

What is Index?

A database index is a data structure which use to improve the speed of operations on a database table.

It’s a physical structure containing pointers to the data. Indices can be created using one or more columns of a database table. Indices are created in an existing table to quickly and efficiently lookups.

It is possible to create an index on one or more columns of a table, and each index is given a name. Best way to improve performance in a database application is effective indexes.

There are two type of index available.

1. Clustered index

Clustered index are physical form of sorting. Therefore only one clustered index can be created on each table because the data rows themselves can only be sorted in one order.


2. Non Clustered index
Non clustered indexes are logical form of sorting. Therefore more than one Non clustered indexes can be created on each table.

Friday, September 10, 2010

Operating System Interview Questions Answers

What is difference between NTFS & FAT32?

Ans: NTFS stands for new technology file system or network technology file system. In NTSF partition size can be of 2 TB or more. and file size can be 16 TB. file/folder encryption is done. and it supports file name character upto 255.

FAT32 stands for File allocation table. in FAT32 partition size can be Upto 2 TB. and file size can be 4 GB. file/folder encryption is not possible in FAT32. and it supports file name character upto 8.3.

What is the difference XP and Windows 2000?

Ans: Windows XP is some what faster than Windows 2000, assuming you have a fast processor and tons of memory (although it will run fine with a 300Mhz Pentium II and 128MB of RAM).

The new Windows XP interface is more cheerful and colorful than earlier versions, although the less-cartoony "Classic" interface can still be used if desired.
Windows XP has more bells and whistles, such as the Windows Movie Maker, built-in CD writer support, the Internet Connection Firewall, and Remote Desktop Connection.
Windows XP has better support for games and comes with more games than Windows 2000.
Windows XP is the latest OS - If you don't upgrade now, you'll probably end up migrating to XP eventually anyway, and we mere mortals can only take so many OS upgrades.

Thursday, September 9, 2010

Delhi Metro Rail Corporation Limited Recruitment Exam

1. Parameter passing mechanism for an array is
a. call by value b. call by value and call by reference
c. call by reference d. none of the above

Ans: (a)

2. Use of functions
a. help to avoid repeating a set of instructions many times
b. enhance the logical flow of the program
c. makes the debugging task easier
d. all of the above

Ans: (d)

3. Storage class defines
a. the data type
b. the scope
c. the scope and performance
d. the scop, performance and data type

Ans: (c)

4. The use of macros in place of functions
a. reduces execution times
b. reduces code size
c. increases execution time
d. increase code size

Ans: (a)

5. Scope of macro definition
a. cannot be beyond the file in which it is defined
b. may be part of a file
c. is in the entire program
d. excludes string of characters within double quotes
e. (a), (b), (d)

Ans: (e)

Wednesday, September 8, 2010

Bharat Electronics Limited Recruitment Exam

1. The address space of 8086 microprocessor is :
a. one megabyte b. 256 kilobytes
c. 1 K megabytes c. 64 kilobytes

Ans: (a) one megabyte

2. Which normal form is considered adequate for normal relational database design ?
a. 2 NF b. 5 NF
c. 4 NF d. 3 NF

Ans: (d) 3 NF

3. When the result of a computation depends on the speed of the processes involved there is said to be
a. cycle stealing b. race condition
c. a time lock d. a deadlock

Ans: (b) race condition

4. Zero has two representations in
a. sign magnitude
b. 1's complement
c. 2's compliment
d. None of the above

Ans: (a) sign magnitude

5. Which of the following addresing modes permits relocation without any change
a. Indirect addressing b. Indexed Addressing
c. Base register addressing d. PC relative addressing

Ans: (c) Base register addressing

Tuesday, September 7, 2010

Objective Type Question Answers of Operating System

1. Which of the command is used to remove files ?
a. erase
b. rm
c. delete
d. dm

Ans: b

2. Which of the following command is used to count just the number of lines contained in a file ?
a. wc-1
b. wc-w
c.wc-c
d. wc-r

Ans: a

3. Which command is used to copy a file wb with the same name from the programs directory to the misc. directory ?
a. copy programs/wb misc/wb
b. cp programs/wb misc
c. copy a:programs/wb b:misc/wb
d. tar programs/wb misc/wb

Ans: b

4. The commonly used UNIX commands like date, Is, cat, etc. are stored in
a. /dev directory
b. /bin and /usr/bin directories
c. /unix directory
d. /tmp directory

Ans: b

5. Which of the following directories contain all the files created by a user, including his login directory ?
a. /tmp
b. /usr
c. /etc
d. /dev

Ans: b

6. Which command is used to copy the three files wb, colllect and mon into the misc directory, under the same, when you were currently in the programs directory ?
a. copy wb collect mon/misc
b. cp wb collect mon ../misc
c. copy wb ../misc collect ../misc mon ../misc
d. tar wb collect mon/misc

Ans: b

7. Which of the following command is used to display the directory attributes rather than its contents ?
a. 1s-1-d
b. Is-x
c. Is-1
d. is-F

Ans: a

8. Which command is used to remove a directory
a. rd
b. dldir
c. rmdir
d. rdir

Ans: c

9. Which command is used to list out all the hidden files along with the other files ?
a. Is-1
b. Is-F
c. Is-x
d Is-a

Ans: d

10. The file that contains a set of instructions which are performed when a user logs in, is
a) .exrc
b) .profile
c) autoexec.bat
d) .autoexec

Ans: b

Operating System Questions

1. Which of the following command can be used to get information about all user who are currently logged into the system ?
a. which
b. who am i
c. who
d. 1/u

Ans: c

2. The command used to remove the directory is
a. rmdir
b. remove
c. rd
d. rdir

Ans: a

3. Which of the following command can be used to get information about yourself
a. who am i
b. pwd
c. i/4
d. which

Ans: a

4. Which of the following command is used to summarize the disk usage ?
a. chkdsk
b. du
c. fdisk
d. disk

Ans: b

5. Which of the following commands is used to copy directory structures in and out ?
a. cp
b. cp-p
c. cpio
d. copy

Ans: c

6. Which of the following signs is used to backup over typing errors in vi ?
a. @
b. $
c. #
d. !

Ans: c

7. Which of the following commands is used to change the working directory ?
a. cd
b. chdir
c. changedir
d. cdir

Ans: a

8. Which of the following signs is used to erase or kill an entire line you have typed and start you are on a new line(but not display a new prompt) ?
a. @
b. $
c. #
d. !

Ans: a

9. Which of the following commands is used to count the total number of lines, words and characters contained in a file.
a. count p
b. wcount
c. wc
d. countw

Ans: c

10. Which of the following commands is used to list contents of directories ?
a. 1s
b. dir
c. 1p
d. tar

Ans: a

Monday, September 6, 2010

Technical Questions for PSU's

1. The operators << (left shift) and >> (right shift) are
a. assignment operators
b. relational operators
c. logical operators
d. bitwise logical operators

Ans: d

2. The values that can legally appear to the right of the assignment operator are called
a. rvalues
b. int values
c. variables
d. constants

Ans: a

3. The string containing certain required formating information is called
a. argument
b. character array
c. character string
d. control string

Ans: d

4. In C, the NULL statement which does nothing is just
(a.) a., (b) ;
(c) : (d) .

Ans: (b)

5. The general form of do-while statement is
a. do expression while statement;
b. do while expression;
c. do statement while expression;
d. do statement while statement;

Ans: c

6. The two statement that can be used to change the flow of control are
a. if and switch
b. if and while
c. switch and do-while
d. break and continue

Ans: a

7. In printf(), the appearance of the output can be affected by
a. field width
b. conversion character
c. flag
d. all of the above
e. none of the above

Ans: d

8. The conversion character 's' for data input means that the data item is
a. an unsigned decimal integer
b. a short integer
c. a hexadecimal integer
d. a string followed by whitespace character

Ans: d

9. The conversion character for data input which indicates that the data item is a floating-point values is
(a) f
(b) g
(c) e
(d) All of the above

Ans: d

10. The conversion character 'i' for data output means that the data item is displayed as -
(a) a floating point value with an exponent
(b) an unsigned decimal integer
(c) a signed decimal integer
(d) an octal integer

Ans: c

Objective Questions of 'C'

1. Precedence determines which operator
a. is evaluated first
b. is most important
c. is fastest
d. operates on the largest number

Ans: a

2. A expression contains relational assignment and arithmetic operator. In the absence of parentheses, the order of evaluation will be

a. assignment, relational, arithmetic
b. arithmetic, relational, assignment
c. relational, arithmetic, assignment
d. assignment, arithmetic, relational

Ans: b

3. The commands that send or "redirect" output of a program to a disk file or another system device such as the printer are

a.
b. [and]
c. /* and /*
d. ( and )

Ans: a

4. Which of the following scanf() statements is true ?
a. scanf("%f', float-var-name);
b. scanf("%d ∑");
c. scanf("%d", &int-var-name);
d. scanf("%d", &number);

Ans: d

5. The meaning of conversion character h for data input is
a. data item is an unsigned decimal integer
b. data item is a short integer
c. data item is a hexadecimal integer
d. data item is a string folowed by a whitespace character

Ans: b

Objective Type Questions on Loop

1. The general form of the conditional expression is
a. expression 1 ? expression 2 :expression 3
b. expression 2 ? expression 3 ?expression 1
c. expression 3 ? expression 2 :expression 1
d. expression 1 ? expression 2 ?expression 3

Ans: a

2. Any program in C, has access to three standard files
a. standrad input file, standard output file, standard error file
b. stdin, stdout, stderr
c. keyboard, screen, screen
d. all of the above
e. none of the above

Ans: d

3. In a simple 'if' statement with no 'else', what happens if the condition following the 'if' is false ?
a. The program searches for the last else in the program
b. Nothing
c. Control 'falls through' to the statement folowing 'if'
d. The body of the statement is executed

Ans: c

4. A while loop is more appropriate than a for loop when
a. the body of the loop will be executed at last once
b. the terminating condition occurs unexpectedly
c. the program will be executed at least once
d. the number of times the loop will be executed is known before the loop is executed
e. none of the above

Ans: b

5. The comma operator(,) is used to
a. permit two different expressions to appear in situations where only once expression would ordinarily be used
b. terminate loops or to exit from switch
c. alter the normal sequence of program execution by transferring control to some other part of the program
d. carry out a logical test and then take one of two possible actions, depending upon the outcome of the test

Ans: a

Relational Database Design and SQL Questions

1. In a relational schema, each tuple is divided into fields called
a. Relations
b. Domains
c. Queries
d. All of the above

Ans: b

2. A logical schema
a. is the entire database
b. is a standard way of organizing information into accessible parts
c. describes how data is actually stored on disk
d. all of the above

Ans: b

3. A form defines
a. where data are placed on the screen
b. the width of each field
c. both (a) and (b)
d. All of the above

Ans: c

4. A top-to-bottom relationship among the items in a database is established by a
a. Hierarchical Schema
b. Network Schema
c. Relational Schema
d. All of the above

Ans: b

5. A good query system
a. can accept English language commands
b. allows non-programmers to access information stored in a database
c. can be accessed only by data processing professionals
d. Both (a) and (b)

Ans: b

6. A report form
a. appears on the computer monitor during data entry
b. is used during report generation to format data
c. Both a and b
d. All of the above

Ans: b

7. A list consists of last names, first names, addresses and pincodes if all people in the list have the same last and the same pincode, a useful key would be
a. the pincode
b. the last name
c. a compound key consisting of the first name and the last name
d. all of the above

Ans: c

8. A command that lets you change one or more fields in a record is
a. Insert
b. Modify
c. Look-up
d. All of the above

Ans: b

10. Which of the following contains a complete record of all activity that affected the contents of a database during a certain period of time ?
a. Report writer
b. Query language
c. Data manipulation language
d. Transaction Log

Ans: d

Some 'C' Programming objective type questions

1. The recursive form of algebric formula
y=(x1,+x2+x3... +xn) is

a. y=x+n-1 xi i=1
b. y=xn+n xi i=1
c. y=xn+xi
d. y=xn+n-1 i=1 xi
e. none of the above

Ans: d

2. Which of the folowing, is a storage class specification of C ?
a. Automatic
b. Mean
c. External
d. String
e. none of the above

Ans: d

3. The statement following else in an 'if-else' construct are executed when
a. the conditional statement following the 'if' is false
b. the conditional statement following the 'if' is teue
c. the conditional statement following the 'else' is false
d. the conditional statement following the 'else' is true
e. none of the above

Ans: a

4. Given these variables
char ch;
short i;
unsigned long u1;
float f;
the overall type of this expression is

a. char
b. unsigned
c. float
d. double
e. none of the above

Ans: c

5. What will this program display ?
#include
main()
{
float f;
f= 10/3;
printf("%f", f);
}

a. 3.3
b. 3.000000
c. 3
d. 3.1

Ans: b

Sunday, September 5, 2010

C and C++ objective type questions

Q1. The braces that surround the code in a 'C' program
a. show what code goes in a particular function
b. delimit a section of code
c. separate the code from the constant
d. separate the source file from the subject file
e. none of the above

Q2. Almost every C program begins with the statement
a. main()
b. printf()
c. #include
d. scanf()
e. none of the above

Q3. A single character input from the keyboard can be obtained by using the function
a. printf()
b. getchar()
c. putchar()
d. scanf()
e. none of the above

Q4. The function scanf() reads
a. a single character
b. character and strings
c. any possible variable type
d. any possible number
e. none of the above

Q5. A field width specifier in a printf() function
a. specifies the maximum value of a number
b. controls the size of type used to print numbers
c. controls the margins of the program
d. specifies how many character positions will be used for a number
e. none of the above

Ans: 1. b , 2. c , 3. b , 4. c , 5. d

UGC Net Computer Science and Application Paper

1. The library files that comes with 'C' are -
Ans: files that contains functions which carry out various commonly used operations and calculations.

2. In 'C' square brackets[] are used in -
a. functions
b. arrays
c. statements
d. all of the above
ANs: b

3. A 'C' program contains the declarations and initial assignments:
int i=8, j=5;
The value of arithmetic expression is int from
2*((i/5)+(4*j-3)%(i+j-2)) is

a. 18
b. 14
c. 1
d. 17

Ans: b

4. The single character input/output functions are
Ans: getchar() and putchar()

5. The purpose of a conditional operator is to-
a. select one of the two values alternately
b. select the highest of the two values
c. select one of the two values depending on a condition
d. select the more equal of the two values

Ans: c

Objective type C & C++ Questions

Q1. An identifier in C
a. is a name of a thing such as variable and function
b. is made up of letters, numerals and the underscore
c. can obtain both upper case and lower case letter
d. all of the above
e. none of the above

Q2. The math library is setup for the user by the file
a. float.h
b. limits.h
c. math.h
d. time.h
e. none of the above

Q3. Which of the following does not have an unary operator ?
a. -7 b. ++i
c. j d. all of the above
e. none of the above

Q4. Assume x, y and z are floating point variables and they have been assigned the values x=8.8, y=3.5, z= -5.2 . The value of arithmetic expression 2*x/(3*y) is
a. 2.000000
b. 1.600000
c. 1.676190
d. 0.676190
e. none of the above

Q5. The two operators && and || are
a. arithmetic operators
b. equality operators
c. logical operators
d. relational operators
e. none of the above

Saturday, September 4, 2010

United Bank of India IT Officer Examination Technical Paper

Ques 1. What do you understand by M-Banking ? What the benifits of M-Banking in Banks ? How M-Marketing is useful for Banks net profit ?

Ques 2. Differentiate two-tier and three-tier client server architecture ?

Ques 3. What do you understand by knowledge searching in Database ? How you relate it with database mining ? How Data mining useful in Database and in busines ?

Multiple choice questions of networking

Q1. A distributed network configuration in which all data/information pass through a central computer is
a. bus network
b. ring network
c. star network
d. point-to-point network
e. none of the above

Q2. The most flexibility in how devices are wired together is provided by
a. bus networks
b. star networks
c. ring networks
d. T-switched networks
e. none of the above

Q3. The communication mode that supports two-way traffic but only one direction at a time is
a. simplex b. half duplex
c. duplex d. multiplex
e. none of the above

Q4. A central Computer surrounded by one or more satellite computers is called a
a. bus network
b. ring network
c. star network
d. all of the above
e. none of the above

Q5. FDDI is a
a. ring network
b. star network
c. mesh network
d. bus based network
e. none of the above

Ans: 1. c , 2. a , 3. b , 4. c , 5. a

Networking for UGC NET Exam

Q.1. Local area networks can transmit
a. slower than telecommunications over public telephone lines.
b. faster than telecommunications over public telephone lines.
c. using twisted-pair wiring or coaxial cables.
d. both a and c
e. none of the above

Q2. A Packet -switching network
a. is free
b. allows communication channels to be shared among more than one user.
c. can reduce the cost of using an information utility.
d. both a and b
e. none of the above

Q3. The application layer of a network
a. establishes, maintains and terminates virtual circuits
b. consists of software being run on the computer connected to the network
c. defines the user's port into the network
d. all of the above
e. none of the above

Q4. Devices on one network can communicate with devices on another network via a
a. file server b. printer server
c. utility server d. gateway
e. none of the above

Q5. A network that requires human inventation of route signals is called a
a. bus network
b. ring network
c. star network
d. T-switched network
e. none of the above

Ans: 1. d , 2. d , 3. b , 4. d , 5. d

Friday, September 3, 2010

Computer Networking Objective Type Question Answer

1. How many pairs of stations can simultaneously communicate on Ethernet LAN ?
Ans: 1

2. A modem that is attached to the telephone system by jamming the phone's handset into two flexible receptacles in the coupler ?

a. gateway
b. time-divison multiplexer
c. acoustic coupler
d. bridge

Ans: c

3. Which of the following allows devices on one network to communicate with devices on another network ?
a. multiplexer
b. gateway
c. t-switch
d. modem

Ans: b

4. A station in a network forwards incoming packets by placing them on its shortest output queue. What routing algorithm is being used ?
a. flooding
b. hot potato routing
c. static routing
d. delta routing

Ans: b

5. The communication mode that supports data in both directions at the same time is
a. simplex
b. half-simplex
c. full-duplex
d. multiplex

Ans: c

6. Modulation is the process of
a. sending a file from one computer to another computer
b. converting digital signals to analog signals
c. converting analog signals to digital signals
d. echoing every character that is received

7. The signal to noise ratio for a voice grade line is 30.1 db or a power ration of 1023:1. The maximum achievable data rate on this line whose spectrum ranges from 300 Hz to 4300 Hz is
a. 6200 bps b. 34000 bps
c. 9600 bps d. 31000 bps

ANs: d

8. Which of the following is used for modulation and demodulation ?
a. modem
b. protocol
c. gateway
d. multiplexer

Ans: a

9. A software that allows a personal computer to pretend is as a terminal is
a. auto-dialing
b. bulletin-board
c. modem
d. terminal emulation

ANs: a

10. Which of the following refers to the terms "residual error rate" ?
a. the number of bit error per twenty four hours of continuous operation on an asynchronus line
b. the probability that one or more errors will be undetected when an error detection scheme is used
c. the probability that one or more errors will be detected when an error detection mechanism is used
d. signal to noise ratio divided by the ratio of energy per bit to noise per hertz

Ans: b

Computer Networks Question Papers

State Whether True or False:

1. The 5-7 digits are known as the country code of the Network User Address(NUA). (T/F)

2. The physical layer, in reference to the OSI model, defines the interface between the X.25 network and the Packet mode device. (T/F)

3. The second layer of communication is the data link layer. (T/F)

4. The data link layer, in reference to the OSI model, the Recommendation X.25 specifies data link procedures that provide for the exchange of data via frames that can be sent and recieved. (T/F)

5. The third layer of communication is the network layer. (T/F)


Ans:

(1) T
(2) T
(3) T
(4) F
(5) T

Networking Question for Examinations

State Whether True or False

1. The First three digit of the DNIC(Data Network Identification Code) identify the city. (T/F)

2. The use of an X.25 Switch as a gateway between the public and private networks provides a cost-effective means of sharing relatively expensive X.25 access lines to the public data networks. (T/F)

3. The Network User Address (NUA) consist of 12 decimal digits and two optional extra digits which are available for packet terminals only to use for sub-addressing. (T/F)

4. The first digit of Network User Address(NUA) are known as the DNIC(Data Network Identification Code). (T/F)

5. The term 'gateway' is commonly used to define a facility which interconnects two networks so that users on one network can communicate with user on another network. (T/F)

6. The term 'gateway' which provides interconnection between private packet switching networks based on OSI principles and the public packet data networks based on the X-series recommendations. (T/F)

7. The 1-4 digits are known as the country code of the Network User Address(NUA). (T/F)

8. The digits 8 to 12 are known as the terminal number of the NUA. (T/F)

9. The CCITT Recommendation X.25 specifies three layers of communications: session, transport and network. (T/F)

10. CCITT Recommendation X.21 defines the international nubering plan for private data networks. (T/F)

Ans:
(1). T, (2). T, (3). T, (4). F, (5). T, (6). T, (7). F, (8). T, (9). T, (10). T

Thursday, September 2, 2010

PSU Papers for Computer Science

1. Dijkstra's banking algorithm in an operating system solves the problem of -
Ans: Deadlock Avoidance

2. In a paged memory system, if the page size is increased, then the internal fragmentation generally -
Ans: Becomes more

3. An operating system contains 3 user processes each requiring 2 units of resources R. The minimum number of units of R such that no deadlock will ever occur is -
Ans: 4

4. Critical region is -
Ans: A set of instructions that access common shared resources which exclude one another in time

5. Kernel is -
Ans: The set of primitive functions upon which the rest of operating system functions are built up

6. Necessary conditions for deadlock are -
Ans: Non-preemption and circular wait, Mutual exclusion and partial allocation

7. In a time sharing operating system, when the time slot given to a process is completed, the process goes from the RUNNING state to the -
Ans: READY state

8. Supervisor call -
Ans: Are privileged calls that are used to perform resource management functions, which are controlled by the operating system

9. Semaphores are used to solve the problem of -
Ans: Mutual exclusion, Process synchronization

10. If the property of locality of reference is well pronounced in a program-
Ans: The number of page faults will be less

Operating System - Question Answer

1. In Round Robin CPU Scheduling, as the time quantum is increased, the average turn around time-
Ans: varies irregulary

2. In a multiprogramming environment-
Ans: more than one process resides in the memory

3. The size of the virtual memory depends on the size of the -
Ans: Address Bus

4. Give example of Scheduling Policies in which context switching never take place-
Ans: Shortest Job First, First-cum-first-served

5. Suppose that a process is in 'BLOCKED' state waiting for some I/O service. When the service is completed, it goes to the-
Ans: READY State

Operating System Question Answer for Competitive Exams

1. Pre-emptive scheduling, is the strategy of temporarily suspending a running process-
Ans: before the CPU time slice expires

2. Mutual exclusion problem occurs -
Ans: among processes that share resources

3. Sector interleaving in disks is done by -
Ans: the operating system

4. Disk scheduling involves deciding-
Ans: the order in which disk access requests must be serviced

5. Dirty bit is used to show the -
Ans: page that is modified after being loaded into cache memory

6. Fence register is used for-
Ans: memory protection.

7. The first-fit, best-fit and worst-fit algorithm can be used for-
Ans: contiguous allocation of memory

8. Give example of single-user operating systems-
Ans: MS-DOS, XENIX

Wednesday, September 1, 2010

Operating System Question Answer

1. Concurrent processes are processes that -
Ans: Overlap in time

2. The page replacement policy that sometimes leads to more page faults when the size of the memory is increased is -
Ans: FIFO

3. The only state transition that is initiated by the user process itself is -
Ans: Block

4. Fragmentation is -
Ans: fragments of memory words unused in a page

5. Give Example of real time systems
Ans: Aircraft control system, A process control system

Tuesday, August 31, 2010

Computer Officer Exam Paper

1. Virtual memory is -
Ans: an illusion of an extremely large memory

2. Special locality refers to the problem that once a location is referenced
Ans: a nearby location will be referenced soon

3. An example of a SPOOLED device
Ans: A line printer used to print the output of a number of jobs

4. Page faults occurs when
Ans: one tries to divide a number by 0

5. Overlay is
Ans: a single contiguous memory that was used in the olden days for running large programs by swapping

Bank IT Officer Exam Papers

1. Which is Computer Memory that does not forget ?
Ans: ROM

2. The computer memory holds data and ?
ans: program

3. What is means by term RAM ?
Ans: Memory which can be both read and written to

4. Which computer memory is esentially empty ?
Ans: RAM

5. The bubbles in a bubble memory pack are created with the help of ?
Ans: magnetic field

Monday, August 30, 2010

TCP/IP

The Internet Protocol Suite (commonly known as TCP/IP) is the set of communications protocols used for the Internet and other similar networks. It is named from two of the most important protocols in it: the Transmission Control Protocol (TCP) and the Internet Protocol (IP), which were the first two networking protocols defined in this standard.

The Internet Protocol Suite, like many protocol suites, may be viewed as a set of layers. Each layer solves a set of problems involving the transmission of data, and provides a well-defined service to the upper layer protocols based on using services from some lower layers. Upper layers are logically closer to the user and deal with more abstract data, relying on lower layer protocols to translate data into forms that can eventually be physically transmitted.

The TCP/IP model consists of four layers (RFC 1122).From lowest to highest, these are the Link Layer, the Internet Layer, the Transport Layer, and the Application Layer.

Internet Protocol

The Internet Protocol(IP) is a protocol used for communicating data across a packet-switched internetwork using the Internet Protocol Suite, also referred to as TCP/IP.

The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the Internet. Each computer (known as a host) on the Internet has at least one IP address that uniquely identifies it from all other computers on the Internet. When you send or receive data (for example, an e-mail note or a Web page), the message gets divided into little chunks called packets. Each of these packets contains both the sender's Internet address and the receiver's address. Any packet is sent first to a gateway computer that understands a small part of the Internet. The gateway computer reads the destination address and forwards the packet to an adjacent gateway that in turn reads the destination address and so forth across the Internet until one gateway recognizes the packet as belonging to a computer within its immediate neighborhood or domain. That gateway then forwards the packet directly to the computer whose address is specified.

IP is the primary protocol in the Internet Layer of the Internet Protocol Suite and has the task of delivering distinguished protocol datagrams (packets) from the source host to the destination host solely based on their addresses. For this purpose the Internet Protocol defines addressing methods and structures for datagram encapsulation. The first major version of addressing structure, now referred to as Internet Protocol Version 4 (IPv4) is still the dominant protocol of the Internet, although the successor, Internet Protocol Version 6 (IPv6) is being deployed actively worldwide.

Sunday, August 29, 2010

Web Portal

A web portal presents information from diverse sources in a unified way. Apart from the standard search engine feature, web portals offer other services such as e-mail, news, stock prices, information, and entertainment. Portals provide a way for enterprises to provide a consistent look and feel with access control and procedures for multiple applications, which otherwise would have been different entities altogether. Examples of a web portal are MSN, Yahoo!, AOL and iGoogle.

Internet Protocol

The Internet Protocol(IP) is a protocol used for communicating data across a packet-switched internetwork using the Internet Protocol Suite, also referred to as TCP/IP.

IP is the primary protocol in the Internet Layer of the Internet Protocol Suite and has the task of delivering distinguished protocol datagrams (packets) from the source host to the destination host solely based on their addresses. For this purpose the Internet Protocol defines addressing methods and structures for datagram encapsulation. The first major version of addressing structure, now referred to as Internet Protocol Version 4 (IPv4) is still the dominant protocol of the Internet, although the successor, Internet Protocol Version 6 (IPv6) is being deployed actively worldwide.

Saturday, August 28, 2010

Some C# Interview Questions and Answers

1. What is a void return type?
A void return type indicates that a method does not return a value.

2. How is it possible for two String objects with identical values not to be equal under the == operator?
The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory.

3. What is the difference between a while statement and a do statement?
A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once.

4. Can a for statement loop indefinitely?
Yes, a for statement can loop indefinitely. For example, consider the following:
for(;;) ;

5. How do you link a C++ program to C functions?
By using the extern “C” linkage specification around the C function declarations.

6. How can you tell what shell you are running on UNIX system?
You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.

7. How do you find out if a linked-list has an end? (i.e. the list is not a cycle)
You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. If that is the case, then you will know the linked-list is a cycle.

8. Can a copy constructor accept an object of the same class as parameter, instead of reference of the object?
No. It is specified in the definition of the copy constructor itself. It should generate an error if a programmer specifies a copy constructor with a first argument that is an object and not a reference.

9. What is a local class? Why can it be useful?
Local class is a class defined within the scope of a function — any function, whether a member function or a free function. Like nested classes, local classes can be a useful tool for managing code dependencies.

10. What is a nested class? Why can it be useful?
A nested class is a class enclosed within the scope of another class.

11. What are the access privileges in C++? What is the default access level?
The access privileges in C++ are private, public and protected. The default access level assigned to members of a class is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it’s sub-classes. Public members of a class can be accessed by anyone.

12. What is multiple inheritance(virtual inheritance)? What are its advantages and disadvantages?
Multiple Inheritance is the process whereby a child can be derived from more than one parent class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion(ambiguity) when two base classes implement a method with the same name.

13. How do you access the static member of a class?
::

14. What does extern “C” int func(int *, Foo) accomplish?
It will turn off “name mangling” for func so that one can link to code compiled by a C compiler.

15.What are the differences between a C++ struct and C++ class?
The default member and base class access specifiers are different. The C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base class inheritance, and a class defaults to the private access specifier and private base class inheritance.

16.What is Virtual Destructor?
Using virtual destructors, you can destroy objects without knowing their type - the correct destructor for the object is invoked using the virtual function mechanism

17. How are prefix and postfix versions of operator++() differentiated?
The postfix version of operator++() has a dummy parameter of type int. The prefix version does not have dummy parameter.

18. What is the difference between a pointer and a reference?
A reference must always refer to some object and, therefore, must always be initialized; pointers do not have such restrictions. A pointer can be reassigned to point to different objects while a reference always refers to an object with which it was initialized.

19. How virtual functions are implemented C++?
Virtual functions are implemented using a table of function pointers, called the vtable.

20. What is “this” pointer?
The this pointer is a pointer accessible only within the member functions of a class, struct, or union type. It points to the object for which the member function is called. Static member functions do not have a this pointer. When a nonstatic member function is called for an object, the address of the object is passed as a hidden argument to the function

21. What is overloading??
With the C++ language, you can overload functions and operators. Overloading is the practice of supplying more than one definition for a given function name in the same scope.
- Any two functions in a set of overloaded functions must have different argument lists.
- Overloading functions with argument lists of the same types, based on return type alone, is an error.

22. What is inline function?
The inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only at the compiler’s discretion. For example, the compiler does not inline a function if its address is taken or if it is too large to inline.

23. What is copy constructor?
Constructor which initializes the it’s object member variables ( by shallow copying) with another object of the same class. If you don’t implement one in your class then compiler implements one for you.

24. What is virtual function?
When derived class overrides the base class method by redefining the same function, then if client wants to access redefined the method from derived class through a pointer from base class object, then you must define this function in base class as virtual function.

DBMS Interview Questions & Answers

What is normalization?
ANSWER:
It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties
• Minimizing redundancy
• Minimizing insertion, deletion and update anomalies.

What is Functional Dependency?
ANSWER:
A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.

When is a functional dependency F said to be minimal?
ANSWER:
• Every dependency in F has a single attribute for its right hand side.
• We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F.
• We cannot remove any dependency from F and still have set of dependency that is equivalent to F.

What is Multivalued dependency?
ANSWER:
Multivalued dependency denoted by X Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties
• t3[x] = t4[X] = t1[X] = t2[X]
• t3[Y] = t1[Y] and t4[Y] = t2[Y]
• t3[Z] = t2[Z] and t4[Z] = t1[Z]
where [Z = (R-(X U Y)) ]

What is Lossless join property?
ANSWER:
It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition.

What is 1 NF (Normal Form)?
ANSWER:
The domain of attribute must include only atomic (simple, indivisible) values.

What is Fully Functional dependency?
ANSWER:
It is based on concept of full functional dependency. A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.

What is 2NF?
ANSWER:
A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.

What is 3NF?
ANSWER:
A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is true
• X is a Super-key of R.
• A is a prime attribute of R.
In other words, if every non prime attribute is non-transitively dependent on primary key.

What is BCNF (Boyce-Codd Normal Form)?
ANSWER:
A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X A, X must be a candidate key.

What is 4NF?
ANSWER:
A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true
• X is subset or equal to (or) XY = R.
• X is a super key.

What is 5NF?
ANSWER:
A Relation schema R is said to be 5NF if for every join dependency {R1, R2, ..., Rn} that holds R, one the following is true
• Ri = R for some i.
• The join dependency is implied by the set of FD, over R in which the left side is key of R.

Friday, August 27, 2010

Some Useful DBMS Interview Questions Answers

What is an attribute?
ANSWER:
It is a particular property, which describes the entity.

What is a Relation Schema and a Relation?
ANSWER:
A relation Schema denoted by R(A1, A2, …, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn).

What is degree of a Relation?
ANSWER:
It is the number of attribute of its relation schema.

What is Relationship?
ANSWER:
It is an association among two or more entities.

What is Relationship set?
ANSWER:
The collection (or set) of similar relationships.

What is Relationship type?
ANSWER:
Relationship type defines a set of associations or a relationship set among a given set of entity types.

What is degree of Relationship type?
ANSWER:
It is the number of entity type participating.

What is Data Storage - Definition Language?
ANSWER:
The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language.

What is DML (Data Manipulation Language)?
ANSWER:
This language that enable user to access or manipulate data as organised by appropriate data model.
• Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data.
• Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.

What is DML Compiler?
ANSWER:
It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand.

What is Query evaluation engine?
ANSWER:
It executes low-level instruction generated by compiler.

What is DDL Interpreter?
ANSWER:
It interprets DDL statements and record them in tables containing metadata.
.

What is Relational Algebra?
ANSWER:
It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation.


What is Relational Calculus?
ANSWER:
It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL.

SQL Server Interview Questions and Answers

What is database?
ANSWER:
A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

What is a Database system?
ANSWER:
The database and DBMS software together is called as Database system.

Disadvantage in File Processing System?
ANSWER:
• Data redundancy & inconsistency.
• Difficult in accessing data.
• Data isolation.
• Data integrity.
• Concurrent access is not possible.
• Security Problems. .

Define the "integrity rules"
ANSWER:
There are two Integrity rules.
• Entity Integrity: States that “Primary key cannot have NULL value”
• Referential Integrity: States that “Foreign Key can be either a NULL value or should be Primary Key value of other relation.

What is extension and intension?
ANSWER:
Extension -It is the number of tuples present in a table at any instance. This is time dependent.
Intension - It is a constant value that gives the name, structure of table and the constraints laid on it.

What is System R? What are its two major subsystems?
ANSWER:
System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center . It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system.
Its two subsystems are
• Research Storage
• System Relational Data System.

How is the data structure of System R different from the relational structure?
ANSWER:
Unlike Relational systems in System R
• Domains are not supported
• Enforcement of candidate key uniqueness is optional
• Enforcement of entity integrity is optional
• Referential integrity is not enforced

What is a view? How it is related to data independence?
ANSWER:
A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.
Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence. .

What is Data Model?
ANSWER:
A collection of conceptual tools for describing data, data relationships data semantics and constraints.

What is E-R model?
ANSWER:
This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.

What is Object Oriented model?
ANSWER:
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.

What is an Entity?
ANSWER:
It is a 'thing' in the real world with an independent existence.

What is an Entity type?
ANSWER:
It is a collection (set) of entities that have same attributes.

What is an Entity set?
ANSWER:
It is a collection of all entities of particular entity type in the database.

What is an Extension of entity type?
ANSWER:
The collections of entities of a particular entity type are grouped together into an entity set.

What is Weak Entity set?
ANSWER:
An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.

Tuesday, August 24, 2010

What is Data Independence ?

Data independence means that “the application is independent of the storage structure and access strategy of data”. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level.

Two types of Data Independence:

• Physical Data Independence : Modification in physical level should not affect the logical level.
• Logical Data Independence : Modification in logical level should affect the view level.
NOTE: Logical Data Independence is more difficult to achieve

Monday, August 23, 2010

Describe the three levels of data abstraction ?

The are three levels of abstraction:

• Physical level: The lowest level of abstraction describes how data are stored.
• Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
• View level: The highest level of abstraction describes only part of entire database.

C++ INterview Questions and Answers

1. What is the difference between an ARRAY and a LIST?

Answer:

Array is collection of homogeneous elements.
List is collection of heterogeneous elements.

For Array memory allocated is static and continuous.
For List memory allocated is dynamic and Random.

Array: User need not have to keep in track of next memory allocation.
List: User has to keep in Track of next location where memory is allocated.

2. Does c++ support multilevel and multiple inheritance?

Ans: Yes.

3. What do you mean by inheritance?

Ans: Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments and refinements of its own.

4. What is a COPY CONSTRUCTOR and when is it called?

Ans: A copy constructor is a method that accepts an object of the same class and copies it’s data members to the object on the left part of assignement:

5. What is virtual class and friend class?

Ans: Friend classes are used when two or more classes are designed to work together and need access to each other's implementation in ways that the rest of the world shouldn't be allowed to have. In other words, they help keep private things private. For instance, it may be desirable for class DatabaseCursor to have more privilege to the internals of class Database than main() has.

Sunday, August 22, 2010

What is DBMS ?

• Redundancy is controlled.
• Unauthorised access is restricted.
• Providing multiple user interfaces.
• Enforcing integrity constraints.
• Providing backup and recovery.

What is RDBMS ?

Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables.

In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data independence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage.

Saturday, August 21, 2010

Data Abstraction, System R and Integrity Rules

Describe the three levels of data abstraction?
ANSWER:
The are three levels of abstraction:
• Physical level: The lowest level of abstraction describes how data are stored.
• Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
• View level: The highest level of abstraction describes only part of entire database.

Define the "integrity rules"
ANSWER:
There are two Integrity rules.
• Entity Integrity: States that “Primary key cannot have NULL value”
• Referential Integrity: States that “Foreign Key can be either a NULL value or should be Primary Key value of other relation.

What is extension and intension?
ANSWER:
Extension -It is the number of tuples present in a table at any instance. This is time dependent.
Intension - It is a constant value that gives the name, structure of table and the constraints laid on it.

What is System R? What are its two major subsystems?
ANSWER:
System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center . It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system.
Its two subsystems are
• Research Storage
• System Relational Data System.

How is the data structure of System R different from the relational structure?
ANSWER:
Unlike Relational systems in System R
• Domains are not supported
• Enforcement of candidate key uniqueness is optional
• Enforcement of entity integrity is optional
• Referential integrity is not enforced

DBMS Interview Questions and Answers

What is database?
ANSWER:
A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

What is DBMS?
ANSWER:
• Redundancy is controlled.
• Unauthorised access is restricted.
• Providing multiple user interfaces.
• Enforcing integrity constraints.
• Providing backup and recovery.

What is a Database system?
ANSWER:
The database and DBMS software together is called as Database system.

Disadvantage in File Processing System?
ANSWER:
• Data redundancy & inconsistency.
• Difficult in accessing data.
• Data isolation.
• Data integrity.
• Concurrent access is not possible.
• Security Problems. .

Friday, August 20, 2010

Wide Area Network (WAN)

Wide Area Network (WAN) is a computer network that covers a broad area (i.e., any network whose communications links cross metropolitan, regional, or national boundaries [1]). In contrast with personal area networks (PANs), local area networks (LANs), campus area networks (CANs), or metropolitan area networks (MANs) which are usually limited to a room, building, campus or specific metropolitan area (e.g., a city) respectively. The largest and most well-known example of a WAN is the Internet.

WANs [a] are used to connect LANs and other types of networks together, so that users and computers in one location can communicate with users and computers in other locations. Many WANs are built for one particular organization and are private. Others, built by Internet service providers, provide connections from an organization's LAN to the Internet. WANs are often built using leased lines.

At each end of the leased line, a router connects to the LAN on one side and a hub within the WAN on the other. Leased lines can be very expensive. Instead of using leased lines, WANs can also be built using less costly circuit switching or packet switching methods. Network protocols including TCP/IP deliver transport and addressing functions. Protocols including Packet over SONET/SDH, MPLS, ATM and Frame relay are often used by service providers to deliver the links that are used in WANs. X.25 was an important early WAN protocol, and is often considered to be the "grandfather" of Frame Relay as many of the underlying protocols and functions of X.25 are still in use today (with upgrades) by Frame Relay.

Local Area Network (LAN)

A local area network (LAN) supplies networking capability to a group of computers in close proximity to each other such as in an office building, a school, or a home. A LAN is useful for sharing resources like files, printers, games or other applications. A LAN in turn often connects to other LANs, and to the Internet or other WAN.

Most local area networks are built with relatively inexpensive hardware such as Ethernet cables, network adapters, and hubs. Wireless LAN and other more advanced LAN hardware options also exist.

A local area network (LAN) is a computer network covering a small physical area, like a home, office, or small group of buildings, such as a school, or an airport. The defining characteristics of LANs, in contrast to wide-area networks (WANs), include their usually higher data-transfer rates, smaller geographic place, and lack of a need for leased telecommunication lines.

ARCNET, Token Ring and many other technologies have been used in the past, and G.hn may be used in the future, but Ethernet over unshielded twisted pair cabling, and Wi-Fi are the two most common technologies currently in use.

Thursday, August 19, 2010

Computer Networking

Computer networking is the engineering discipline concerned with communication between computer systems or devices. Networking, routers, routing protocols, and networking over the public Internet have their specifications defined in documents called RFCs. Computer networking is sometimes considered a sub-discipline of telecommunications, computer science, information technology and/or computer engineering. Computer networks rely heavily upon the theoretical and practical application of these scientific and engineering disciplines.

A computer network is any set of computers or devices connected to each other with the ability to exchange data. Examples of different networks are:

Local area network (LAN), which is usually a small network constrained to a small geographic area.
Wide area network (WAN) that is usually a larger network that covers a large geographic area.

Wireless LANs and WANs (WLAN & WWAN) are the wireless equivalent of the LAN and WAN.
All networks are interconnected to allow communication with a variety of different kinds of media, including twisted-pair copper wire cable, coaxial cable, optical fiber, power lines and various wireless technologies. The devices can be separated by a few meters (e.g. via Bluetooth) or nearly unlimited distances

Garbage Collection

Garbage collection is a mechanism that allows the computer to detect when an object can no longer be accessed. It then automatically releases the memory used by that object (as well as calling a clean-up routine, called a "finalizer," which is written by the user). Some garbage collectors, like the one used by .NET, compact memory and therefore decrease your program's working set.

Wednesday, August 18, 2010

Application Domain

An application domain (often AppDomain) is a virtual process that serves to isolate an application. All objects created within the same application scope (in other words, anywhere along the sequence of object activations beginning with the application entry point) are created within the same application domain. Multiple application domains can exist in a single operating system process, making them a lightweight means of application isolation.

An OS process provides isolation by having a distinct memory address space. While this is effective, it is also expensive, and does not scale to the numbers required for large web servers. The Common Language Runtime, on the other hand, enforces application isolation by managing the memory use of code running within the application domain. This ensures that it does not access memory outside the boundaries of the domain. It is important to note that only type-safe code can be managed in this way (the runtime cannot guarantee isolation when unsafe code is loaded in an application domain).

What is the difference between Server.Transfer and Response.Redirect ?

The Transfer method allows you to transfer from inside one ASP page to another ASP page. All of the state information that has been created for the first (calling) ASP page will be transferred to the second (called) ASP page.

This transferred information includes all objects and variables that have been given a value in an Application or Session scope, and all items in the Request collections. For example, the second ASP page will have the same SessionID as the first ASP page.

When the second (called) ASP page completes its tasks, you do not return to the first (calling) ASP page. All these happen on the server side browser is not aware of this.

The redirect message issue HTTP 304 to the browser and causes browser to got the specified page. Hence there is round trip between client and server. Unlike transfer, redirect doesn’t pass context information to the called page.

Tuesday, August 17, 2010

Validation Controls in ASP.NET

Type of validation Control to use
Description

Required entry RequiredFieldValidator Ensures that the user does not skip an entry.

Comparison to a value CompareValidator Compares a user's entry against a constant value, or against a property value of another control, using a comparison operator (less than, equal, greater than, and so on).

Range checking RangeValidator Checks that a user's entry is between specified lower and upper boundaries. You can check ranges within pairs of numbers, alphabetic characters, and dates.

Pattern matching RegularExpressionValidator Checks that the entry matches a pattern defined by a regular expression. This type of validation allows you to check for predictable sequences of characters, such as those in social security numbers, e-mail addresses, telephone numbers, postal codes, and so on.
User-defined CustomValidator Checks the user's entry using validation logic that you write yourself. This type of validation allows you to check for values derived at run time.

What are the main differences between ASP and ASP.NET ?

ASP 3.0

• Supports VBScript and JavaScript
o scripting languages are limited in scope
o interpreted from top to bottom each time the page is loaded
• Files end with *.asp extension
• 5 objects: Request, Response, Server, Application, Session
• Queried databases return recordsets
• Uses conventional HTML forms for data collection

ASP .NET

• Supports a number of languages including Visual Basic, C#, and JScript
o code is compiled into .NET classes and stored to speed up multiple hits on a page
o object oriented and event driven makes coding web pages more like traditional applications
• Files end with *.aspx extension
• .NET contains over 3400 classes
• XML-friendly data sets are used instead of recordsets
• Uses web forms that look like HTML forms to the client, but add much functionality due to server-side coding
• Has built-in validation objects
• Improved debugging feature (great news for programmers)
• ASP .NET controls can be binded to a data source, including XML recordsets
Source: mikekissman.com

Monday, August 16, 2010

State Management Questions and Answers

1. What is ViewState?
Ans: ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used the retain the state of server-side objects between postabacks.

2. What is the lifespan for items stored in ViewState?
Ans: Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

3. What does the "EnableViewState" property do? Why would I want it on or off?
Ans: It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate.

4. What are the different types of Session state management options available with ASP.NET?
Ans: ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.

Web Service Questions and Answers

1. What is the transport protocol you use to call a Web service?
Ans: SOAP (Simple Object Access Protocol) is the preferred protocol.

2. True or False: A Web service can only be written in .NET?
Ans: False

3. What does WSDL stand for?
Ans: Web Services Description Language.

4. Where on the Internet would you look for Web services?
Ans: http://www.uddi.org

5. True or False: To test a Web service you must create a Windows application or Web application to consume this service?
Ans: False, the web service comes with a test page and it provides HTTP-GET method to test.

Sunday, August 15, 2010

ASP.NET Interview Questions and Answers

1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.
Ans : inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.

2. What’s the difference between Response.Write() andResponse.Output.Write()?
Ans: Response.Output.Write() allows you to write formatted output.

3. What methods are fired during the page load?
Ans: Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - when page finishes loading.

4. When during the page processing cycle is ViewState available?
Ans :After the Init() and before the Page_Load(), or OnLoad() for a control.

5. What namespace does the Web page belong in the .NET Framework class hierarchy?
And: System.Web.UI.Page

6. Where do you store the information about the user’s locale?
Ans: System.Web.UI.Page.Culture

7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?
Ans: CodeBehind is relevant to Visual Studio.NET only.

8. What’s a bubbled event?
Ans: When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?
Ans: Add an OnMouseOver attribute to the button. Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");

10. What data types do the RangeValidator control support?
Ans: Integer, String, and Date.

11. Explain the differences between Server-side and Client-side code?
Ans: Server-side code executes on the server. Client-side code executes in the client's browser.

12. What type of code (server or client) is found in a Code-Behind class?
Ans: The answer is server-side code since code-behind is executed on the server. However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser. But just to be clear, code-behind executes on the server, thus making it server-side code.

13. Should user input data validation occur server-side or client-side? Why?
Ans: All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.

14. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Ans: Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url. Response.Redirect is used to redirect the user's browser to another page or site. This performas a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.

15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
Ans: Valid answers are:
• A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
• A DataSet is designed to work without any continuing connection to the original data source.
• Data in a DataSet is bulk-loaded, rather than being loaded on demand.
• There's no concept of cursor types in a DataSet.
• DataSets have no current record pointer You can use For Each loops to move through the data.
• You can store many edits in a DataSet, and write them to the original data source in a single operation.
• Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

16. What is the Global.asax used for?
Ans: The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.

17. What are the Application_Start and Session_Start subroutines used for?
ANs: This is where you can set the specific variables for the Application and Session objects.

18. Can you explain what inheritance is and an example of when you might use it?
Ans: When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee base class.

19. Whats an assembly?
Ans: Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN

20. Describe the difference between inline and code behind.
Ans: Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.

21. Explain what a diffgram is, and a good use for one?
Ans: The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. A good use is reading database data to an XML file to be sent to a Web Service.

22. Whats MSIL, and why should my developers need an appreciation of it if at all?
Ans: MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.

23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
Ans: The Fill() method.

24. Can you edit data in the Repeater control?
Ans: No, it just reads the information from its data source.

25. Which template must you provide, in order to display data in a Repeater control?
Ans: ItemTemplate.

26. How can you provide an alternating color scheme in a Repeater control?
Ans: Use the AlternatingItemTemplate.

27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?
Ans: You must set the DataSource property and call the DataBind method.

28. What base class do all Web Forms inherit from?
Ans: The Page class.

29. Name two properties common in every validation control?
Ans: ControlToValidate property and Text property.

30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
Ans: DataTextField property.

31. Which control would you use if you needed to make sure the values in two different controls matched?
Ans: CompareValidator control.

32. How many classes can a single .NET DLL contain?
Ans: It can contain many classes.