Sunteți pe pagina 1din 12

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.

com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

TITLE: Oracle Financial Services Software Sample Programming Placement Paper Level1 (Bolded option is your answer) 1. What will be the output of the program? #include<stdio.h> int main() { int y=128; const int x=y; printf("%d\n", x); return 0; } A 128 B Garbage value

C Error

D0

2. What will be the output of the program? #include<stdio.h> int main() { const int x=5; const int *ptrx; ptrx = &x; *ptrx = 10; printf("%d\n", x); return 0; }
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

A5

B 10

C Error

D Garbage value

3. What will be the output of the program? #include<stdio.h> int main() { const c = -11; const int d = 34; printf("%d, %d\n", c, d); return 0; } A Error B -11, 34

C 11, 34

D None of these

4. What will be the output of the program? #include<stdio.h> int main() { const char *s = ""; char str[] = "Hello"; s = str; while(*s) printf("%c", *s++); return 0; }
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

A Error

BH

C Hello

D Hel

5. Declare the following statement? "An array of three pointers to chars". A char *ptr[3](); B char *ptr[3]; C char (*ptr[3])(); D char **ptr[3];

6. What do the following declaration signify? int *ptr[30]; A ptr is a B ptr is a array of C ptr is a pointer 30 pointers to array of 30 to an integers. integer array of pointers. 30 integer pointers. 7. What do the following declaration signify? int (*pf)(); A pf is a B pf is a function pointer pointer. to function.

D ptr is a array 30 pointers.

C pf is a pointer to a function which return int 8. What do the following declaration signify?

D pf is a function of pointer variable.

void *cmp(); A cmp is B cmp is a void type C cmp is a D cmp function a pointer pointer variable. function that returns nothing. to an return a void
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

void type.

pointer.

9. Declare the following statement? "A pointer to a function which receives nothing and returns nothing". A void B void *(*ptr)() C void *(ptr)*int *(*ptr)(*) ; 10. What do the following declaration signify? D void (*ptr)()

char *scr; A scr is a B scr is a function C scr is a D scr is a member of pointer pointer. pointer to function pointer. to char. pointer variable. 11. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ? A rem = B rem = modf(3.14, C rem = D Remainder cannot 3.14 % 2.1); fmod(3.14, be obtain in floating 2.1; 2.1); point division. 12. Which of the following special symbol allowed in a variable name? A* B | (pipeline) (asterisk) C - (hyphen) D _ (underscore)

13. When we mention the prototype of a function? A Defining B Declaring C Prototyping D Calling

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

14. What is the output of the program in Turbo C (in DOS 16-bit OS)? #include<stdio.h> int main() { char *s1; char far *s2; char huge *s3; printf("%d, %d, %d\n", sizeof(s1), sizeof(s2), sizeof(s3)); return 0; } A 2, 4, 6 B 4, 4, 2 C 2, 4, 4 D 2, 2, 2 15. What is the output of the program #include<stdio.h> int main() { int x = 10, y = 20, z = 5, i; i = x < y < z; printf("%d\n", i); return 0; } A0 B1

C Error

D None of these

16. What is the output of the program #include<stdio.h> int main() {


Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

int a[5] = {2, 3}; printf("%d, %d, %d\n", a[2], a[3], a[4]); return 0; } A B 2, 3, 3 C 3, 2, 2 D 0, 0, 0 Garbage Values 17. What will you do to treat the constant 3.14 as a long double? A use 3.14LD B use 3.14L C use 3.14DL D use 3.14LF

18. Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ? A 3.4EB 3.4E-4932 to C 1.1E-4932 D 1.7E-4932 to 4932 to 3.4E+4932 to 1.1E+4932 1.7E+4932 1.1E+493 2 19. Which of the following statement obtains the remainder on dividing 5.5 by 1.3 ? A rem = B rem = modf(5.5, C rem = D Error: we can't (5.5 % 1.3) fmod(5.5, divide 1.3) 1.3) 20. Assunming, integer is 2 byte, What will be the output of the program? #include<stdio.h> int main() { printf("%x\n", -1>>1);
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

return 0; } A ffff B 0fff C 0000 D fff0

21. Assuming a integer 2-bytes, What will be the output of the program? #include<stdio.h> int main() { printf("%x\n", -1<<3); return 0; } A ffff B fff8

C0

D -1

22. What will be the output of the program? #include<stdio.h> int main() { unsigned int res; res = (64 >>(2+1-2)) & (~(1<<2)); printf("%d\n", res); return 0; } A 32 B 64 C0

D 128

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

23. What function should be used to free the memory allocated by calloc() ? A B C free(); D dealloc(); malloc(variable_na memalloc(variable_na me, 0) me, 0) 24. Specify the 2 library functions to dynamically allocate memory? A B alloc() and C malloc() D memalloc() and malloc() memalloc() and calloc() faralloc() and memalloc () 25. Which of the following cannot be checked in a switch-case statement? A B Integer Character C Float D enum

26. What will be the output of the program? #include<stdio.h> int main() { char ch; if(ch = printf("")) printf("It matters\n"); else printf("It doesn't matters\n"); return 0; }

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

A It matters

B It doesn't matters

C matters

D No output

27. What will be the output of the program? #include<stdio.h> int main() { int k, num = 30; k = (num < 10) ? 100 : 200; printf("%d\n", num); return 0; } A 200 B 30

C 100

D 500

28. What will be the output of the program? #include<stdio.h> int main() { int a = 300, b, c; if(a >= 400) b = 300; c = 200; printf("%d, %d, %d\n", a, b, c); return 0; } A 300, B Garbage, 300, C 300, D 300, 300, Garbage 300, 200 200 Garbage, 200 29. Point out the error, if any in the program.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

#include<stdio.h> int main() { int a = 10; switch(a) { } printf("This is c program."); return 0; } A Error: B Error: No default C No Error No case specified statemen t specified 30. Point out the error, if any in the program. #include<stdio.h> int main() { int a = 10, b; a >=5 ? b=100: b=200; printf("%d\n", b); return 0; } A 100 B 200

D Error: infinite loop occurs

C Error: L value required for b

D Garbage value

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

31. In the following code, the P2 is Integer Pointer or Integer? typedef int *ptr; ptr p1, p2; A Integer B Integer pointer

C Error in declaration

D None of above

32. What is x in the following program? #include<stdio.h> int main() { typedef char (*(*arrfptr[3])())[10]; arrfptr x; return 0; } A x is a B x is an array of C x is an D Error in x pointer three pointer array of declaration three function pointers 33. Which of the following is the correct usage of conditional operators used in C? A a>b ? B a>b ? c=30; C max = a>b ? D return (a>b)?(a:b) c=30 : a>c?a:c:b>c? c=40; b:c 34. Which of the following is the correct order if calling functions in the below code? a = f1(23, 14) * f2(12/4) + f3();
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

A f1, f2, f3

C Order may D None of above vary from compiler to compiler 35. Which of the following are unary operators in C? 1. ! 2. sizeof 3. ~ 4. && A 1, 2 B 1, 3 C 2, 4 D 1, 2, 3 36. What will be the output of the program? #include<stdio.h> int main() { int x=12, y=7, z; z = x!=4 || y == 2; printf("z=%d\n", z); return 0; } A z=0 B z=1

B f3, f2, f1

C z=4

D z=2

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail https://groups.google.com/group/latestoffcampusLive updates on Facebook @ https://www.facebook.com/LatestOffCampus

S-ar putea să vă placă și