Anda di halaman 1dari 3

________________________________________________________________________________

___
COMPANY NAME : Oracle
-----------------------------------------------------------DATE OF TEST : 13 th july 2003
-----------------------------------------------------------PLACE OF TEST: Chennai
-----------------------------------------------------------MODE
: Off-campus
-----------------------------------------------------------DURATION
:
________________________________________________________________________________
___

-----Original Message----From: karthik karthik


Sent: Monday, July 14, 2003 12:32 PM
To: CHETANA-JOBS@yahoogroups.com
Subject: [CHETANA] oracle-walk-in-chennai-13-Jul-c/c++ questions
Dear friends,
I attended the oracle walk-in chennai,But i failed. My exp. will be help ful fo
r u in the future.
Test is 30 min,30 Quetions.Questions are simple. But,I think that they expect
higher cut-off i.e. above 28 is to be answered corretly.
* some questions are Code Snippet based.
* Some questions are compiler based i.e. given code snippet will compile or not
, if not the reason.
* some question are from the prfix/postfix inc/dec operation based code snippet
s.
* More than 3 question are based on the sorting algorithms.
* some questions are from the pointers based.
* Code snippets involving memory allocation function.
* All the questions are from c
Some of the question ,i remember, are the following
1.
#include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
a)4 b)5 c)None d)can not compile
Ans: 5
2. what is the wrong in the following program?
#define LBRACKET {
#define RBRACKET }
#define MAIN main
int MAIN()
LBRACKET

int x=2;
printf("%d",x);
RBRACKET
a) This program will compile
b) compilation error
3.
#include <stdio.h>
int main()
{
int x=4;
{
{
{
int x=2;
printf("%d",x);
}
}
}
}
a) 4 b)2 c)Nesting not allowed d)dependent on the compiler
4. Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
a) Compilation Error b) Strings are allowed in c but cannot be assigned direct
ly.
c) dependent on compiler
d) will work fine.
5. the expression a+b*c should be conveted to +a*bc. Using tree structure,
Which traversal is the correct one?
a) Postfix traversal b) prefix traversal c) infix traversal d)None
6. what about brk, sbrk
a) system calls b) function calls c) user defined functions
7. Why the use of alloca() is discouraged?
8. Macros support multiple arguments ?
9. the header file
a) contains only compiler directives and extern variables
b) contail only structures and unitions
c) a & b
10. what about "char *(*(*a[])())();"

________________________________________________________________________________
___
You have downloaded this Paper from "CHETANA-JOBS" Yahoo Group
-------------------------------------------------------------------To directly subscribe through e-mail, just send a blank mail to :
CHETANA-JOBS-subscribe@yahoogroups.com
-------------------------------------------------------------------To unsubscribe from this group, send a blank email to:
CHETANA-JOBS-unsubscribe@yahoogroups.com
-------------------------------------------------------------------To learn more about the CHETANA-JOBS group,
please visit: http://groups.yahoo.com/group/CHETANA-JOBS
________________________________________________________________________________
___

Anda mungkin juga menyukai