Showing posts with label Campus Interviews. Show all posts
Showing posts with label Campus Interviews. 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:

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

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

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

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.

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

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:

Tuesday, 28 August 2012

Frequently Asked Questions in Technical Round at MNCs like TCS, WIPRO, INFOSYS,..etc – 15

Predict the output or error(s) for the following:


1)

main()

{

int i=_l_abc(10);


printf("%d\n",--i);


}

int _l_abc(int i)

{

 return(i++);


}

Answer:

9


Explanation:

Monday, 12 March 2012

Frequently Asked Questions in Technical Round at MNCs like TCS, WIPRO, INFOSYS,..etc – 14

Predict the output or error(s) for the following:


1)

struct point

{

 int x;


 int y;


 };

struct point origin,*pp;

main()

{

pp=&origin;


printf("origin is(%d%d)\n",(*pp).x,(*pp).y);


printf("origin is (%d%d)\n",pp->x,pp->y);


}

Answer:

origin is(0,0)


origin is(0,0)


Explanation:

Wednesday, 7 March 2012

What are different types of caching using cache object of ASP.NET?

You can use two types of output caching to cache information that is to be transmitted to and displayed in a Web browser:

Page Output Caching


Page output caching adds the response of page to cache object. Later when page is requested page is displayed from cache rather than creating the page object and displaying it. Page output caching is good if the site is fairly static.



Page Fragment Caching

Saturday, 25 February 2012

Friday, 24 February 2012

How can you restore a redirected standard stream?

The preceding example showed how you can redirect a standard stream from within your program. But what if later in your program you wanted to restore the standard stream to its original state? By using the standard C library functions named dup() and fdopen(), you can restore a standard stream such as stdout to its original state.

The dup() function duplicates a file handle. You can use the dup() function to save the file handle corresponding to the stdout standard

Sunday, 19 February 2012

If errno contains a nonzero number, is there an error?

The global variable errno is used by many standard C library functions to pass back to your program an error code that denotes specifically which error occurred. However, your program should not check the value of errno to determine whether an error occurred.

Usually, the standard C library function you are calling returns with a return code which denotes that an error has occurred and that the

Thursday, 27 October 2011

Sun Certified Java Programmer (SCJP)

Declarations and access control


Arrays


Arrays are dynamically created objects in Java code. An array can hold a number of variables of the same type. The variables can be primitives or object references; an array can even contain other arrays.

Declaring array variables


When we declare an array variable, the code creates a variable that can hold the reference to an array object. It does not create the array object or allocate space for array elements. It is illegal to specify the

Sun Certified Java Programmer (SCJP)

The SCJP exam is the first in a series of Java certification exams offered by Sun Microsystems, and for many programmers it is the first step to becoming established as a competent Java developer.

The exam tests the knowledge of Java fundamentals and requires in-depth knowledge of the syntax and semantics of the language. Even experienced Java programmers can benefit from preparing for the SCJP exam. You get to learn very subtle and useful tips you might not have been aware of, even after many years of Java programming.

Saturday, 22 October 2011

Predict the output or error(s) for the following:

main()

{

            int i=-1,j=-1,k=0,l=2,m;

            m=i++&&j++&&k++||l++;

            printf("%d %d %d %d %d",i,j,k,l,m);

}

Answer:

0 0 1 3 1

Explanation :

Logical operations always give a result of 1 or 0 . And also the logical AND (&&) operator has higher priority over the logical OR (||)

Predict the output or error(s) for the following:

 main()

{

            extern int i;

            i=20;

           printf("%d",i);

}

 Answer:

Linker Error : Undefined symbol '_i'

Explanation:

extern storage class in the following declaration,

extern int i;

specifies to the compiler that the memory for i is allocated in some

Friday, 21 October 2011

What is Manifest in .Net?

Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do the following things

  • Version of assembly

  • Security identity

  • Scope of the assembly

  • Resolve references to resources and classes.

  • The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a stand-alone PE file that contains only assembly manifest information.