programming languages Online Quiz - 182
Description: programming languages Online Quiz - 182 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
What is the output of following code snippet ? void main() { printf(printf("anna")); }
What is the output of following code snippet ? void main() { int arr[5]={10,20,30,40,50}; printf("%d",(arr+2)); }
What gets printed when the following program is compiled and run? class test { public static void main(String args[]) { int i,j,k,l=0; k = l++; j = ++k; i = j++; System.out.println(i); } }
What gets printed when the following program is compiled and run. protected class example {public static void main(String args[]) {String test = "abc";test = test + test;System.out.println(test);}}
package inheritance; public class TestInheritance3 { protected int p = 100; } package inheritance1; import inheritance.TestInheritance3; public class TestInheritance_3 extends TestInheritance3 { void printP() { System.out.println("p= "+p); } public static void main(String[] args) { TestInheritance_3 T_3 = new TestInheritance_3(); T_3.printP(); } }
package inheritance; public class TestInheritance7{ protected int p = 100; } package inheritance1; import inheritance.TestInheritance7; public class TestInheritance_7 extends TestInheritance7{ void printP() { TestInheritance7 T7 = new TestInheritance7(); System.out.println("p = "+T7.p); } public static void main(String[] args) { TestInheritance_7 T_7 = new TestInheritance_7(); T_7.printP(); } }