Call Support +91-85588-96644
TCYonline

Login

Sign Up

Please enter a Username or Email ID
Please enter a password
Keep me logged in
Please enter your name
Please enter your mobile number
You can't leave Captcha Code empty
By submitting this form, you agree to the Terms & Privacy Policy.
OR

Sign Up via Facebook

Sign Up via Google

Sign Up via Twitter

Download Software
Tests given

Download TCY App

App Image

All posts related to Computer architect

Vijin Paulraj
Shared from Java Programming Test on Jul 28, 2013 2:12 AM

What is the output of the following code?

public void select(){int a = 2;switch(a){case 1: {System.out.println(case 1);}case 2: {System.out.println(case 2);}default: {System.out.println(default);}}}

 
Prints case 1
Prints case 2
Prints case 2 default
Prints case 1 case 2
Please type your answer before submitting.

Compilation error will occur until you change the code to the following : public static void select(){ int a = 2; switch(a){ case 1: { System.out.println("case 1"); } case 2: { System.out.println("case 2"); } default: { System.out.println("default"); } } }

Vijin Paulraj
Shared from Computer Language (JAVA) on Jul 27, 2013 1:02 AM

The static block is executed even without main method in the application program (in JAVA 6).

 
True
False
Please type your answer before submitting.

You cannot answer this question unless you specify the Java version. This question is completely wrong as if you run a static block in a machine which is running Java 7.

Gopal
Shared from Unix OS - 2 on Jul 16, 2013 3:41 AM

Which command is used to display the end of a file?

 
head - r
tail
eof
bof
Please type your answer before submitting.

Eof

Manikanda Kumar G
Shared from Programming on Jul 09, 2013 12:30 PM

Which of the following languages is predecessor to C programming language?

 
A
B
B+
C++
C+
Please type your answer before submitting.

Compiler is

Rafees Rahim
Shared from Programming on Jul 07, 2013 9:16 PM

p++ executes faster than p + 1 because

 
p uses registers
p++ is a single instruction
++ is faster than +
none of these
Please type your answer before submitting.

B