You are on page 1of 7

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

com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

TITLE: Logica CMG Sample Programming Placement Paper Level1 (Bolded option is your answer) 1. ___________should be used to obtain a remainder after dividing 3.14 by 2.1 ? A rem = fmod(3.14, 2.1); 2. ________a declaration or definition? extern int i; A Declaration 3. The binary equivalent of 5.375 is A 101.011 4. In which header file is the NULL macro defined? A stdio.h and stddef.h 5. The operator used to get value at address stored in a pointer variable is A* 6. What is the similarity between a structure, union and enumeration? A All of them let you define new data types

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

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

7. In which numbering system can the binary number 1011011111000101 be easily converted to? A Hexadecimal system 8. Specify the 2 library functions to dynamically allocate memory? A malloc() and calloc() 9. Input/output function prototypes and macros are defined in which header file? A stdio.h 10. What will the function randomize() do in Turbo C under DOS? A returns a random number generator with a random value based on time. 11. The keyword used to transfer control from a function back to the calling function is A return 12. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? A The program may crash if some important data gets overwritten. 13. Out of fgets() and gets() which function is safe to use?

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

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

A fgets() 14. __________correctly shows the hierarchy of arithmetic operations in C? A/*+15. _______is used to find the first occurrence of a given string in another string? A strstr() 16. What do the 'c' and 'v' in argv stands for? A 'c' means argument count 'v' means argument vector 17. ________declaration signify? void *cmp(); A cmp is a function that return a void pointer. 18. ________declaration signify? char *scr; A scr is a pointer to char. 19. _________is not the member of class? A Friend function 20. _________concepts provides facility of using object of one class inside another class?
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

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

A Composition 21. _________concepts means waiting until runtime to determine which function to call? A Dynamic binding 22. __________ways are legal to access a class data member using this pointer? A this->x 23. ________is the correct way to declare a pure virtual function? A virtual void Display(void) = 0; 24. ________is correct in C++? A Structures can have functions as members. 25. __________is correct about the constructors and destructors? A Constructors can take arguments but destructors cannot. 26. What does a class hierarchy depict? A It describes "kind of" relationships. 27. _______will be correct if the function has three arguments passed to it?
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

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

A The trailing argument will be the default argument. 28. _______is incorrect? A We can provide a default value to a particular argument in the middle of an argument list. 29. What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor? A Compile-time error. 30. __________ used to make a copy of one class object from another class object of the same class type. A copy constructor 31. How many default constructors per class are possible? A Only one 32. Destructors __________ for automatic objects if the program terminates with a call to function exit or function abort. A are not called 33. ______is correct? 1.An array of references is acceptable. 2.We can also create a reference to a reference. A Both 1 and 2 are incorrect.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

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

34. ______is correct? A An array of references is not acceptable. 35. _________components of the .NET framework provide an extensible set of classes that can be used by any .NET compliant programming language? A .NET class libraries 36. ________are correct about JIT? 1.JIT compiler compiles instructions into machine code at run time. 2.The code compiler by the JIT compiler runs under CLR. 3.The instructions compiled by JIT compilers are written in native code. 4.The instructions compiled by JIT compilers are written in Intermediate Language (IL) code. 5.The method is JIT compiled even if it is not called A 1, 2, 3 37. Suppose n is a variable of the type Byte and we wish to put OFF its fourth bit (from right) without disturbing any other bits.________will do this correctly? A n = n & 0xF7 38. __________are correct about static functions? A Static functions are invoked using class. 39. class HappyGarbage01 { public static void main(String args[])
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

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

{ HappyGarbage01 h = new HappyGarbage01(); h.methodA(); /* Line 6 */ } Object methodA() { Object obj1 = new Object(); Object [] obj2 = new Object[1]; obj2[0] = obj1; obj1 = null; return obj2[0]; } } Where will be the most chance of the garbage collector being invoked? A Garbage collector never invoked in methodA() 40. Which is valid declaration of a float? A float f = 1F;

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

You might also like