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.
The access modifier of default constructor is not same as class modifier
If a constructor uses super, it must use it in the first line; otherwise, the compiler will complain.
What is true from the following?
A local variable with the same name as an instance variable
Select the true statement from the below choices
State which stament is true?
1) Class A has a Class D 2)Methods in Class A use public methods in Class B 3)Methods in class C use public methods in class A 4)Methods in class A use variables in class C. What is most likely true?
Look at the code below and select the correct answer:#include main(){printf ("hello world");}
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 above will go into an infinite loop.
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); }
Code: #include #include #include main() { int i=0, j=0; clrscr(); for (i=0; i<=5;i++) { for (j=0; j
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"); }
static methods cannot be overridden to non-static methods.
we can not override a synchronized method as non-synchronized method.