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
A ( hypothetical ;) ) graphics program uses the following structure to represet a 3d point struct point3d { int x; int y; int z; // X,y,z represent the three cooddinates of a 3d point in space }; A function was written to calculate the distace between two point3d objects. void func(point3d pt1,point3d pt2) { // Calculate the distance ..... } say at run time 2 million point3d struct objects were created and the above mentioned function was called say 1 million times. Calling the above mentioned function will result in a performance hit because
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?
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?
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