1. Visit www.latestoffcampus.com For More Placement Papers, Interview tips , Job Updates
To Get 24*7 Updates Via Facebook Like Us @ http://www.facebook.com/LatestOffCampus
To Get Free Job Updates To Your mail Join US @ http://groups.google.com/group/latestoffcampus/subscribe
TITLE: TCS Sample Programming Placement Paper Level-I
(Bolded option is your answer)
1. What are the types of linkages?
A Internal and B External, C External and None D Internal
External Internal and
None
2. 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
3. In which header file is the NULL macro defined?
A stdio.h B stddef.h C stdio.h and D math.h
stddef.h
4. How will you free the allocated memory ?
A remove(var- B free(var- C delete(var-name); D dalloc(var-name);
name); name);
5. In which numbering system can the binary number 1011011111000101 be easily
converted to?
A Decimal B Hexadecimal C Octal system D
system system No need to convert
6. Specify the 2 library functions to dynamically allocate memory?
A malloc() and B alloc() and C malloc() and D memalloc() and faralloc()
memalloc() memalloc() calloc()
7. What is stderr ?
A standard B standard error C standard error D standard error definitions
error types streams
8. Which of the following cannot be checked in a switch-case statement?
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get
free updates to mail https://groups.google.com/group/latestoffcampus Live updates on
Facebook @ https://www.facebook.com/LatestOffCampus
2. Visit www.latestoffcampus.com For More Placement Papers, Interview tips , Job Updates
To Get 24*7 Updates Via Facebook Like Us @ http://www.facebook.com/LatestOffCampus
To Get Free Job Updates To Your mail Join US @ http://groups.google.com/group/latestoffcampus/subscribe
A Character B Integer C Float D enum
9. The keyword used to transfer control from a function back to the calling function is
A switch B goto C go back D return
10. Which of the following term is used for a function defined inside a class?
A Member B Member C Class function D Classic function
Variable function
11. Which of the following concept of oops allows compiler to insert arguments in a
function call if it is not specified?
A Call by value B Call by C Default arguments D Call by pointer
reference
12. Which of the following access specifies is used in a class definition by default?
A Protected B Public C Private D Friend
13. Which of the following keywords is used to control access to a class member?
A Default B Break C Protected D Asm
14. Which of the following function / type of function cannot be overloaded?
A Member B Static function C Virtual function D Both B and C
function
15. Where the default value of parameter have to be specified?
A Function call B Function C Function D Both B or C
definition prototype
16. A constructor that accepts __________ parameters is called the default
constructor.
A one B two C no D three
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get
free updates to mail https://groups.google.com/group/latestoffcampus Live updates on
Facebook @ https://www.facebook.com/LatestOffCampus
3. Visit www.latestoffcampus.com For More Placement Papers, Interview tips , Job Updates
To Get 24*7 Updates Via Facebook Like Us @ http://www.facebook.com/LatestOffCampus
To Get Free Job Updates To Your mail Join US @ http://groups.google.com/group/latestoffcampus/subscribe
17. Destructor has the same name as the constructor and it is preceded by ______ .
A! B? C~ D$
18. Which of the following statement is correct?
A A B A referenced C A referenced has to D Whether a reference
referenced has does not need be double de- should be de-referenced or
to be de- to be de- referenced to access not depends on the type of
referenced to referenced to a value. the reference.
access a value. access a value
19. Which of the following .NET components can be used to remove unused
references from the managed heap?
A Common B CLR C Garbage Collector D Class Loader
Language
Infrastructure
20. Which of the following is the correct output for the C#.NET code snippet given
below?
Console.WriteLine(13 / 2 + " " + 13 % 2);
A 6.5 1 B 6.5 0 C60 D61
21. How many times can a constructor be called during lifetime of the object?
A As many B Only once. C Depends upon a D Any number of times
times as we Project Setting made before the object gets
call it. in Visual Studio.NET. garbage collected.
22. Which of the folowing does an indexer allow to index in the same way as an
array?
1.A class
2.A property
3.A struct
4.A function
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get
free updates to mail https://groups.google.com/group/latestoffcampus Live updates on
Facebook @ https://www.facebook.com/LatestOffCampus
4. Visit www.latestoffcampus.com For More Placement Papers, Interview tips , Job Updates
To Get 24*7 Updates Via Facebook Like Us @ http://www.facebook.com/LatestOffCampus
To Get Free Job Updates To Your mail Join US @ http://groups.google.com/group/latestoffcampus/subscribe
5.An interface
A 1, 3, 5 B 2, 4 C 3, 5 D 3, 4, 5
23. Which of the following keyword is used to change the data and behavior of a base
class by replacing a member of a base class with a new derived member?
A new B base C overloads D override
24. Suppose on pushing a button an object is to be notified, but it is not known until
runtime which object should be notified. Which of the following programming
constructs should be used to implement this idea?
A Attribute B Delegate C Namespace D Interface
25. Which of the following is NOT an Integer?
A Char B Byte C Integer D Short
26. How many values is a function capable of returning?
A1 B0 C Depends upon how D Any number of values.
many params
arguments does it
use.
27. The [Serializable()] attribute gets inspected at
A Compile- B Run-time C Design-time D Linking-time
time
28. Which of the following is the correct output of the C#.NET code snippet given
below?
int[ , , ] a = new int[ 3, 2, 3 ];
Console.WriteLine(a.Length);
A 20 B4 C 18 D 10
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get
free updates to mail https://groups.google.com/group/latestoffcampus Live updates on
Facebook @ https://www.facebook.com/LatestOffCampus
5. Visit www.latestoffcampus.com For More Placement Papers, Interview tips , Job Updates
To Get 24*7 Updates Via Facebook Like Us @ http://www.facebook.com/LatestOffCampus
To Get Free Job Updates To Your mail Join US @ http://groups.google.com/group/latestoffcampus/subscribe
29. Which is a valid keyword in java?
A interface B string C Float D unsigned
30. Which constructs an anonymous inner class instance?
A Runnable r = B Runnable r = C Runnable r = new D System.out.println(new
new new Runnable { public Runnable() {public void
Runnable() { }; Runnable(public void run(){}}; run() { }});
void run() { });
31. What will be the output of the program?
public class Test
{
public static void main(String[] args)
{
int x = 0;
assert (x > 0) ? "assertion failed" : "assertion passed" ;
System.out.println("finished");
}
}
A finished B Compiliation C An AssertionError D An AssertionError is
fails. is thrown and thrown with the message
finished is output. "assertion failed."
32. What is the prototype of the default constructor?
A Test( ) B Test(void) C public Test( ) D public Test(void)
33. What is the name of the method used to start a thread execution?
A init(); B start(); C run(); D resume();
34. What is the value of "d" after this line of code has been executed?
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get
free updates to mail https://groups.google.com/group/latestoffcampus Live updates on
Facebook @ https://www.facebook.com/LatestOffCampus
6. Visit www.latestoffcampus.com For More Placement Papers, Interview tips , Job Updates
To Get 24*7 Updates Via Facebook Like Us @ http://www.facebook.com/LatestOffCampus
To Get Free Job Updates To Your mail Join US @ http://groups.google.com/group/latestoffcampus/subscribe
double d = Math.round ( 2.5 + Math.random( ));
A2 B3 C4 D 2.5
35. What will be the output of the program?
class Test
{
public static void main(String [] args)
{
int x=20;
String sup = (x < 15) ? "small" : (x < 22)? "tiny" : "huge";
System.out.println(sup);
}
}
A small B tiny C huge D Compilation fails
36. Which class does not override the equals() and hashCode() methods, inheriting
them directly from class Object?
A B C D java.lang.Character
java.lang.String java.lang.Double java.lang.StringBuffer
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get
free updates to mail https://groups.google.com/group/latestoffcampus Live updates on
Facebook @ https://www.facebook.com/LatestOffCampus