programming languages Online Quiz - 252
Description: programming languages Online Quiz - 252 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
If you write a class with no constructors; the compiler will automatically supplies a no-argument(default)constructors
constructors can be overloaded but can't be overridden and constructors cannot be inherited.
If a constructor uses super, it must use it in the first line; otherwise, the compiler will complain.
A local variable with the same name as an instance variable
State which stament is true?
See the code below and select the correct answer: #include main() { int i; printf ("enter integer: "); scanf ("%d",&i); printf ("You have entered: %f ", i); return (0); }
See the code below and select the correct answer: #include #include #include main() { clrscr(); int i; printf ("enter integer: "); scanf ("%d",&i); printf ("You have entered: %d ", i); getch(); return (0); }
The output of the above code is 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The code below will go into infinite loop: #include #include #include main() { int i=0, j=0; clrscr(); for (i=0; i<5;i++) { for (j=i; j<=0; j--) { printf ("1\t"); } printf("\n"); } getch(); return (0); }
Note the following code and then select the correct answer: #include main() { int i; printf ("enter integer: "); scanf ("%d",&i); printf ("You have entered: %f ", i); return (0); }
Note the code below and select the correct answer: #include main() { printf ("hello world"); }
we can not override a synchronized method as non-synchronized method.