NCR CORP. PAPER - HYDERABAD

 

Four Sections.

1.RDBMS/SQL Concepts. (5 Marks)

2.C and Data Structures. (5 Marks)

3.Programming. (10 Marks)

4.Operating Systems. (5 Marks)

 

Each section contains five bits.Except Programming.

 

1.Operating Systems. (5 Marks)

 

1.Using UNIX Shell Commands,how you will count the number of lines in ASCII

 

2.What is sticky bit in UNIX.

 

3.Difference between process and deamon.

 

4.Why thread is light-weight

 

5.What is Monitor.

 

2.C and Data Sructures (5 Marks)

 

1.program given n asked to write the type of error.

 

2.write tha c code in one statement for given "N" number is ODD/EVEN

 

3.what are linked list.

 

4.Question on binary search tree.(dnt remember)

 

5.one function was given n asked to explain that function.

 

3.RDBMS/SQL (5 Marks)

 

1.If two tables are given. Department(Dept_id,dept_name) employee(emp_id,emp_name,emp_sal) write the query for all departments id and the sum of all  employee sal should be greater than 500. 

 

2.select "true" from dual where 1="NULL"; will this dual statement will return NULL if not rewrite the statement.

 

3.Two tables were given and query was given on "left outer joins" and asked to write the output.

 

4.Query on subquery/nested query was given to select the correct o/p( 4 multiple choices were given).

 

5. difference between PK column and unique column.

 

4.Programming (10 Marks)

 

Write a c program

take two strings "str1" and "str2" and find the end letters of the first string

return true if found.

 

 

The pattern for the company NCR Teradata in HYD.

 

The exam was of 1:45 and consisted of C,C++,DataStructures, total 4(5 Marks)... but I couldn t get thru....

 

Note that the code or the values may not be correct.... Just get the concept.

 

Predict the o/p... each 1 mark

 

1.

static int i;

{

i=10;

...

}

printf("%d",i);

Ans: 10

 

2.

#define func1(a) #a

#define func2(a,b,c) a##b##c

printf("%s",func1(func2(a,b,c)))

Ans: func2(a,b,c)

 

3.

const int* ptr;

int* ptr1;

int a=10;

const int p=20;

ptr=a;

ptr1=p;

 

 

4.

class a

virtual disp()

{ printf("In a");}

class b:public a

disp()

{ printf("In b");}

class c:public a

disp()

{ printf("In c");}

main()

{

a obj;

b objb;

c objc;

a=objb;

a.disp();

a=objc;

a.disp();

Ans: "In a" "In a"

 

5.

a="str";

char *b="new str";

char *temp;

malloc(sizeof(temp)+1,....

strcpy(a,temp);

malloc(sizeof(b)+1,....

strcpy(temp,b);

 

6.

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

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

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

 

7.

class x

{

double b;

double *l;

float &c;

}

main()

{

double g=10.34;

double *f=1.3;

float k=9;

x o;

o.b=g;

o.l=f;

o.c=k;

}

 

Ans: Compiler Error

 

 

Write C/C++ code for following:

 

For all the probs, u will have decide on wht DS to use.... and u r program must be efficient...explain in detail... (5 Marks)

 

1. Find the Kth smallest element in a Binary Tree. (5 Marks)

 

2. Each worker does a job and is given a rating +ve,-ve or Zero.

Find the MaxSubSequenceSum for given no. of workers.

Ex: Workers=6; Ratings={1,0,-1,4,5,-3}

MaxSubSequenceSum=4+5=9 (5 Marks)

 

3. 1 to N ppl sitting in a circle. Each one passes a hot potato to the next person. After M passes the person holding the potato is eliminated. The last person remaining is winner. Find winner for given N,M.

Ex: N=5, M=2, Winner=4 (5 Marks)

 

4. Reverse a given Linked List. (5 Marks)

 

5. There is a file called KnowledgeBase.txt which contains some words. Given a sub-string u have to find all the words which match the word in the file.

Ex: file contains a, ant, and, dog, pen.

If I give "an" I should get o/p as "ant, and" (10 Marks)

 

6. Company employee have id,level,no. of sub-ordinates under him...

If a emp leaves then his sub-ordinates are assigned to any of the emp s seniors... Write four functions:

NCR Placement Papers and Sample Papers

 

The pattern for the company NCR Teradata in HYD.

 

The exam was of 1:45 and consisted of -

 

C,C++, Data Structures

 

total 4(5 Marks)...

 

Note that the code or the values may not be correct.... Just get the concept.

 

Predict the o/p... each 1 mark

 

1.

static int i;

{

i=10;

...

}

printf("%d",i);

Ans: 10

 

2.

#define func1(a) #a

#define func2(a,b,c) a##b##c

printf("%s",func1(func2(a,b,c)))

Ans: func2(a,b,c)

 

3.

const int* ptr;

int* ptr1;

int a=10;

const int p=20;

ptr=a;

ptr1=p;

 

4.

class a

virtual disp()

{ printf("In a");}

class b:public a

disp()

{ printf("In b");}

class c:public a

disp()

{ printf("In c");}

main()

{

a obj;

b objb;

c objc;

a=objb;

a.disp();

a=objc;

a.disp();

Ans: "In a" "In a"

 

5.

a="str";

char *b="new str";

char *temp;

malloc(sizeof(temp)+1,....

strcpy(a,temp);

malloc(sizeof(b)+1,....

strcpy(temp,b);

 

6.

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

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

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

 

7.

class x

{

double b;

double *l;

float &c;

}

main()

{

double g=10.34;

double *f=1.3;

float k=9;

x o;

o.b=g;

o.l=f;

o.c=k;

}

 

Ans: Compiler Error

 

Write C/C++ code for following:

 

 

For all the probs, u will have decide on wht DS to use.... and u'r program must be efficient...explain in detail... (5 Marks)

 

1. Find the Kth smallest element in a Binary Tree. (5 Marks)

 

2. Each worker does a job and is given a rating +ve,-ve or Zero.

 

Find the MaxSubSequenceSum for given no. of workers.

 

Ex: Workers=6; Ratings={1,0,-1,4,5,-3}

 

MaxSubSequenceSum=4+5=9 (5 Marks)

 

3. 1 to N ppl sitting in a circle. Each one passes a hot potato to the next person. After M passes the person holding the potato is eliminated. The last person remaining is winner. Find winner for given N,M.

 

Ex: N=5, M=2, Winner=4 (5 Marks)

 

4. Reverse a given Linked List. (5 Marks)

 

5. There is a file called KnowledgeBase.txt which contains some words. Given a sub-string u have to find all the words which match the word in the file.

 

Ex: file contains a, ant, and, dog, pen.

 

If I give "an" I should get o/p as "ant, and" (10 Marks)

 

6. Company employee have id,level,no. of sub-ordinates under him...

 

If a emp leaves then his sub-ordinates are assigned to any of the emp's seniors...

Write four functions:

 

ConstructEmployee

JoinEmp

LeaveEmp

TransferEmp

NCR Placement Question Papers

 

1.

static int i;

{

i=10;

}

printf(”%d”,i);

Ans: 10

 

2.

#define func1(a) #a

#define func2(a,b,c) a##b##c

printf(”%s”,func1(func2(a,b,c)))

Ans: func2(a,b,c)

 

3.

const int* ptr;

int* ptr1;

int a=10;

const int p=20;

ptr=a;

ptr1=p;

 

4.

class a

virtual disp()

{ printf(”In a”);}

class b:public a

disp()

{ printf(”In b”);}

class c:public a

disp()

{ printf(”In c”);}

main()

{

a obj;

b objb;

c objc;

a=objb;

a.disp();

a=objc;

a.disp();

Ans: “In a” “In a”

 

5.

a=”str”;

char *b=”new str”;

char *temp;

malloc(sizeof(temp)+1,….

strcpy(a,temp);

malloc(sizeof(b)+1,….

strcpy(temp,b);

 

6.

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

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

printf(”%d…”,m,i,j,k);

 

7.

class x

{

double b;

double *l;

float &c;

}

main()

{

double g=10.34;

double *f=1.3;

float k=9;

x o;

o.b=g;

o.l=f;

o.c=k;

}

 

Ans: Compiler Error

 

Write C/C++ code for following:

 

For all the probs, u will have decide on wht DS to use…. and u’r program must be efficient…explain in detail… (5 Marks)

 

1. Find the Kth smallest element in a Binary Tree. (5 Marks)

 

2. Each worker does a job and is given a rating +ve,-ve or Zero.

 

Find the MaxSubSequenceSum for given no. of workers.

 

Ex: Workers=6; Ratings={1,0,-1,4,5,-3}

 

MaxSubSequenceSum=4+5=9 (5 Marks)

 

3. 1 to N ppl sitting in a circle. Each one passes a hot potato to the next person. After M passes the person holding the potato is eliminated. The last person remaining is winner. Find winner for given N,M.

 

Ex: N=5, M=2, Winner=4 (5 Marks)

 

4. Reverse a given Linked List. (5 Marks)

 

5. There is a file called KnowledgeBase.txt which contains some words. Given a sub-string u have to find all the words which match the word in the file.

 

Ex: file contains a, ant, and, dog, pen.

 

If I give “an” I should get o/p as “ant, and” (10 Marks)

 

6. Company employee have id,level,no. of sub-ordinates under him…

 

If a emp leaves then his sub-ordinates are assigned to any of the emp’s seniors…

Write four functions:

 

Click to download more papers

Clcik to download more papers