programming languages Online Quiz - 65
programming languages Online Quiz - 65
Questions
Question 1 Multiple Choice (Single Answer)
Java enables the creation of cross-platform programs by compiling into an intermediate representation called Java ____________.
- Byte Code
- Firewall
- Class Code
- Bit Code
Question 2 Multiple Choice (Single Answer)
There are _____ types of Comments in Java.
- One
- Two
- Three
- Four
Question 3 Multiple Choice (Single Answer)
All statements in Java end with a _____________.
- Colon
- SemiColon
- Hypen
- Dot
Question 4 True/False
The simplest form of the for loop in Java is for(initialization; condition; iteration) statement;
- True
- False
Question 5 True/False
The print( ) method is just like println( ), except that it does not output a newline character after each call.
- True
- False
Question 6 Multiple Choice (Single Answer)
What is delegate in C++?
- Functions
- Templates
- Function pointers
- Pointer of pointers
Question 7 Multiple Choice (Single Answer)
_tcscat(str1, str2) function in C++ is similar to this in C Sharp.
- strcat(str1,str2)
- str1.Append(str2)
- str1.CopyAtEnd(str2)
- str1=str1+str2
Question 8 Multiple Choice (Single Answer)
FILE *fp=_tfopen("c:\test.txt","rws"); this code is equivalent to in C#
- FileStream fp= new FileStream("c:\test.txt", FileMode.Create, FileAccess.Write,FileShare.Read);
- FileStream fp= new FileStream("c:\test.txt", "rws");
- FileStream fp= new FileStream("c:\test.txt", FileMode.ReadWriteShared);
- FileStream fp= new FileStream("c:\test.txt", FileMode.ReadWrite, FileAccess.Shared);
Question 9 Multiple Choice (Single Answer)
namespace keyword in C# and C++ refers to
- namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is used to define templates
- namespace in C# and C++ are for same purpose
- namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is used to define STL classes
- namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is undefined.
Question 10 Multiple Choice (Single Answer)
C++ uses pointers. Choose the one which is not TRUE about C Sharp.
- Pointers are not supported in C#
- Pointers are supported in C# as is in C++
- Pointers are replaced by delegates
- Pointers can be used by declaring unsafe blocks