Showing posts with label Campus Preparation. Show all posts
Showing posts with label Campus Preparation. Show all posts

Thursday, 7 February 2013

Infosys Campus Interviews Previous Questions

1. Father's age is three years more than three times the son's age.  After three years, father's age will be ten years more than twice the son's age.  What is the father's present age.

Ans: 33 years.                



2. Find the values of each of the alphabets.


N O O N
S O O N
+ M O O N
----------
J U N E

Ans:

Monday, 4 February 2013

Why is allowing this redundancy a bad practice that one should avoid whenever possible?

Q) Consider an E-R diagram in which the same entity set appears several times. Why is allowing this redundancy a bad practice that one should avoid whenever possible?


Answer: By using one entity set many times we are missing relationships in the model.

Thursday, 31 January 2013

Define the concept of aggregation. Give two examples of where this concept is useful.

Q) Define the concept of aggregation. Give two examples of where this concept is useful.


Answer: Aggregation is an abstraction through which relationships are treated as higher-level entities. Thus the relationship between entities A and B is treated as if it were an entity C. Some examples of this are:

a. Employees work for projects. An employee working for a particular project uses various

Friday, 25 January 2013

Explain the difference between a weak and a strong entity set.

Q) Explain the difference between a weak and a strong entity set.


Answer :

A strong entity set has a primary key. All tuples in the set are distinguishable by that key. A weak entity set has no primary key unless attributes of the strong entity set on which it depends are included. Tuples in a weak entity set are partitioned according to their relationship with

Tuesday, 22 January 2013

E-R diagram for favourite sports team statistics

Q) Design an E-R diagramfor keeping track of the exploits of your favourite sports team. You should store the matches played, the scores in eachmatch, the players in each match and individual player statistics for each match. Summary statistics should be modeled as

Saturday, 19 January 2013

E-R diagram for marks database

Consider a database used to record the marks that students get in different exams of different course offerings.

a) Construct an E-R diagram that models exams as entities, and uses a ternary relationship, for the above database.

Answer :

Friday, 11 January 2013

Floating point representation

The floating point representation of a number has two parts. The first part represents a signed, fixed point number called the mantissa. The second point designates the position of the decimal point and is called as the exponent. The fixed mantissa may be a

Wednesday, 9 January 2013

E-R diagram for a university

A university registrar’s office maintains data about the following entities:

(a) courses, including number, title, credits, syllabus, and prerequisites;

(b) course offerings, including course number, year, semester, section number, instructor(s), timings, and

Sunday, 6 January 2013

Binary Multiplication & Binary Division

Binary Multiplication


Binary multiplication is performed in same way as decimal numbers. A simplistic way to perform multiplication is by repeated addition. The multiplication rules for binary digits is as follows

Thursday, 3 January 2013

Explain the distinctions among the terms primary key, candidate key, and superkey.

Answer: A superkey is a set of one or more attributes that, taken collectively, allows us to identify uniquely an entity in the entity set. A superkey may contain extraneous attributes. If K is a superkey, then so is any superset of K. A superkey for which no proper subset is also a superkey is called a candidate

Monday, 24 December 2012

Binary addition & Binary Subtraction

Binary addition:


The rules for binary addition are the same as those for any positional number system. One adds the digits column-wise from the right. If the sum is greater than B–1 for base B, a carry into the next column is generated. In the case of binary numbers, a sum greater than one generates a carry. Here is the binary addition table:

Saturday, 22 December 2012

List six major steps that you would take in setting up a database for a particular enterprise.

Answer: Six major steps in setting up a database for a particular enterprise are:

  •  Define the high level requirements of the enterprise (this step generates a document known as the system requirements specification.)

  •  Define a model containing all appropriate types of data and data relationships.

Tuesday, 18 December 2012

Signed and Unsigned numbers

In mathematics, negative numbers in any base are represented in the usual way, by prefixing them with a "−" sign. However, on a computer, there are various ways of representing a number's sign. Now we discuss the following methods for representing signed numbers in a computer.

Sign-and-magnitude


The first approach for representing a number's sign

Sunday, 16 December 2012

List five responsibilities of a database management system.

Q) List five responsibilities of a database management system. For each responsibility, explain the problems that would arise if the responsibility were not discharged.

Answer: A general purpose database manager (DBM) has five responsibilities:

a. interaction with the file manager.


b. integrity enforcement.


c. security enforcement.


d. backup and recovery.


e. concurrency control.


If these responsibilities were not met by a given DBM

Saturday, 15 December 2012

List four significant differences between a file-processing system and a DBMS.

Answer: Some main differences between a database management system and a file-processing system are:

  • Both systems contain a collection of data and a set of programs which access that data. A database management system coordinates both the physical and the logical access to the data, whereas a file-processing system coordinates only the physical

Tuesday, 27 November 2012

[latexpage]

$ a\xrightarrow{\text{This is very long text}}b $

Wednesday, 21 November 2012

C Program to determine a file’s attributes.

How to determine a file’s attributes?


The file attributes are stored in the find_t.attrib structure member. This structure member is a single character, and each file attribute is represented by a single bit. Here is a list of the valid DOS file attributes:

Wednesday, 17 October 2012

C Program to sort filenames in a directory?

How do you sort filenames in a directory?


The below example shows how to get a list of files one at a time. The example uses the _dos_findfirst() and _dos_findnext() functions to walk through the directory structure. As each filename is found, it is printed to the screen.

When you are sorting the filenames in a directory, the one-at- a-time approach does not work. You need some way to store the filenames and then sort them when all filenames have been

Tuesday, 14 August 2012