Programming Languages: C, C++, and Java
Test your knowledge of C, C++, and Java programming languages including history, syntax, features, and key concepts.
Questions
1.Set s = new TreeSet(); 2.s.add("JAVA"); 3.s.add(new Integer(5)); Line 3 will give ClassCast Exception because Two different types of object are getting added.
- True
- False
What is the value of variable z when the following program segment ends? int z; for(z=0; z<50; z++) {}
- 51
- 49
- 0
- 50
Which of the following operators cannot be overloaded?
- sizeof
- ::
- :?
- All the Above
The vtable entry for a pure virtual function in C++ is
- zero
- NULL
- one
- No Entry in vtable
For the class exforsys defined as below: class exforsys() { }; int main() { exforsys a; } Which of the following is TRUE?
- No default constructor is provided by the compiler
- The compiler provides the default constructor
- The compiler generates error
- None of the Above
The friend function of a class in C++ can access
- Private members of the class
- protected members of the class
- Both A and B
- None of the Above
Which programming language was invented by Dennis Ritchie in 1972?
- C++
- C
- JAVA
- COBOL
Which was the first object oriented programming language?
- JAVA
- C++
- C
- SIMULA
Which programming language resembles its name to coffee?
- JAVA
- SIMULA
- C++
- B
JAVA promised which one of these?
- Write Once, Run Anywhere
- Read Once, Write Anywhere
- Read Once, Run Anywhere
- Write Twice, Run Once
Which programming language was invented by Dennis Ritchie in 1972?
- C++
- C
- JAVA
- COBOL
C++ programming language was invented by _______.
- Dennis Ritchie
- James Gosling
- Bjarne Stroustrup
- Ken Thompson
int ThatsMyFunction() { return 5; } void main() { printf("%u",ThatsMyFunction); }
- Compilation Error
- Some Unknown Random Number
- 5
- I Dont Know
void main() { int i; char *item; for(i=0;i<512;i++,item++) printf("%c",item); }
- ASCII Table - twice
- Segmentation fault
- I hate this Quiz and I dont know it
- Compilation Error