programming languages Online Quiz - 168
Description: programming languages Online Quiz - 168 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
I have a function declaration like this(in C/C++).const int f(int* a){ ..... // Do something here return *a; }what is the purpose of the keyword const here?
A friend of mine once wrote a function as follows. int * func() { int i; for (int k=0;k<200;k++) //Do something here .... return &i; } I think it is faulty . What is wrong here?
I want to declare a pointer to a constant int variable ,pointing to a constant memory location. What is the syntax?
void vp; char c; int i=20; float f=30.00; pick the line which will cause an error in a C++ compiler
consider the following line in the c++ code extern "C" { f1(); f2();... } The purpose of the extern keyword is
public static void main(String[] args){ Integer i = new Integer(5); List myList; myList = new ArrayList(); myList.add(3); myList.add(5); myList.add(7); myList.remove(i); for(String s: myList) { System.out.println("List Value >> "+s); } } What is the output?
public static void main(String[] args){ Integer i = new Integer(5); List myList; myList = new ArrayList(); myList.add(3); myList.add(5); myList.add(7); myList.remove(i); for(String s: myList) { System.out.println("List Value >> "+s); } } What is the output?
class A{ public void _a(){ System.out.println("A"); } } class B extends A{ public void _a(){ System.out.println("B"); } } public class InheritanceTest { public static void main(String[] args){ A aa = new B(); System.out.println(aa._a()); } } What is the output?
class B1{ public B1(){ System.out.println("B"); } } class A1 extends B1{ void A1(){ System.out.println("A"); } } public class Test { public static void main(String[] args){ B1 a = new A1(); } } what will be output?
class A2{ static void doprint(){ System.out.println("A2"); } } class B2 extends A2{ static void doprint(){ System.out.println("B2"); } } public class StaticTest { public static void main(String[] args) { A2 a = new B2(); a.doprint(); } }
public class SwitchTest { public static void main(String[] args) { Boolean b = Boolean.TRUE; switch(b) { case(true): System.out.println("A"); case(false): System.out.println("B"); case(3): System.out.println("C"); } } } output?
Which one of the following is not a JSP Action?
- Which of the following can be used/efficient to store items(name/value pairs) in which the number of items can be less or more(not known)?
Valuetypes cannot be assigned with NULL Value?
Constants cannot be marked with which of the below keywords
A delegate is
which of the following classes require the Serializable attribute to be defined to serialize and deserialize objects?
IDeserializationCallback.OnDeserialization() , an interface method implemented is called automatically by runtime