programming languages Online Quiz - 65

programming languages Online Quiz - 65

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Java enables the creation of cross-platform programs by compiling into an intermediate representation called Java ____________.

  1. Byte Code
  2. Firewall
  3. Class Code
  4. Bit Code
Question 2 Multiple Choice (Single Answer)

There are _____ types of Comments in Java.

  1. One
  2. Two
  3. Three
  4. Four
Question 3 Multiple Choice (Single Answer)

All statements in Java end with a _____________.

  1. Colon
  2. SemiColon
  3. Hypen
  4. Dot
Question 4 True/False

The simplest form of the for loop in Java is for(initialization; condition; iteration) statement;

  1. True
  2. False
Question 5 True/False

The print( ) method is just like println( ), except that it does not output a newline character after each call.

  1. True
  2. False
Question 6 Multiple Choice (Single Answer)

What is delegate in C++?

  1. Functions
  2. Templates
  3. Function pointers
  4. Pointer of pointers
Question 7 Multiple Choice (Single Answer)

_tcscat(str1, str2) function in C++ is similar to this in C Sharp.

  1. strcat(str1,str2)
  2. str1.Append(str2)
  3. str1.CopyAtEnd(str2)
  4. str1=str1+str2
Question 8 Multiple Choice (Single Answer)

FILE *fp=_tfopen("c:\test.txt","rws"); this code is equivalent to in C#

  1. FileStream fp= new FileStream("c:\test.txt", FileMode.Create, FileAccess.Write,FileShare.Read);
  2. FileStream fp= new FileStream("c:\test.txt", "rws");
  3. FileStream fp= new FileStream("c:\test.txt", FileMode.ReadWriteShared);
  4. 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

  1. namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is used to define templates
  2. namespace in C# and C++ are for same purpose
  3. namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is used to define STL classes
  4. 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.

  1. Pointers are not supported in C#
  2. Pointers are supported in C# as is in C++
  3. Pointers are replaced by delegates
  4. Pointers can be used by declaring unsafe blocks