Tag: programming languages
Questions Related to programming languages
-
Structs cannot be inherited.
-
Structs are passed by value, not by reference.
-
Struct is stored on the stack, not the heap.
-
structs can be inherited
-
Classes that are both in the same assembly and derived from the declaring class.
-
Only methods that are in the same class as the method in question.
-
Classes within the same assembly, and classes derived from the declaring class.
-
Classes in different assembly
-
10
-
12
-
compilation error
-
none of these
-
8 bit
-
1 bit
-
machine dependent
-
none of these
-
void run();
-
protected void go();
-
public abstract set();
-
none of these
-
interface declares constant and instance variables.
-
The abstract modifier can be combined with the static modifier .
-
native modifier can be applied only on method.
-
synchronized modifier can be applied to method as well as class
-
none of these
-
class cons{ cons() { } public void cons(); public static void main (String[] aa){ cons b=new cons(); } }
-
public class cons { ............... cons() { } public cons(int x,int y) { System.out.print(x +" "+ y); } public static void main (String[] aa){ cons b=new cons(); cons obj=new cons(4,2); }
-
public class cons { public cons(int x) { System.out.print(x); } public static void main (String[] aa){ cons b=new cons(); } }
-
class cons{ cons() { } public float foo () { double f = 32; return f; } public static void main (String[] aa){ cons b=new cons(); } }
-
10
-
12
-
compilation error
-
none of these
-
8 bit
-
1 bit
-
machine dependent
-
none of these