Programming Languages History and Concepts

A quiz covering the invention years of various programming languages along with concepts from Java collections and C programming syntax

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What will be the output of the following program : void main() { char str[]="C For Swimmers"; printf("%d",sizeof str); }

  1. 14
  2. Compile-Time Error
  3. 15
  4. None of the above
Question 2 Multiple Choice (Single Answer)

What will be the output of the following program : void main() { printf("%d",!(100==100)+1); }

  1. 100
  2. 0
  3. 1
  4. 2
Question 3 Multiple Choice (Single Answer)

What will be the output of the following program : void main() { int x=5,y=6,z=2; z/=y/z==3?y/z:x*y; printf("%d",z); }

  1. 0
  2. 1
  3. 2
  4. Compile Time Error
Question 4 Multiple Choice (Single Answer)

What will be the output of the following program : void main() { printf("%d %d %d",5,!5,25-!25); }

  1. 500 100 30 40 4
  2. Run-Time Error
  3. 300 -200 300 10 4
  4. 700 200 300 10 4
Question 5 True/False

It is not possible to make a hashmap synchronized. True/False?

  1. True
  2. False
Question 6 True/False

Map is an interface which extends Collection interface?

  1. True
  2. False
Question 7 True/False

ListIterator is an implementation of the Iterator interface. True/False

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

which of the following is correct?

  1. java.util.Collection
  2. java.lang.Collection
  3. java.util.Collections
  4. java.lang.Collections
Question 9 Multiple Choice (Single Answer)

Which of the following is true?

  1. Stack is a data structure that is based on First-in-First-Out (FIFO) rule
  2. Queues are based on Last-In-First-Out (LIFO) rule
  3. Neither (a) nor (b)
  4. Both (a) and (b)
Question 10 Multiple Choice (Multiple Answers)

Which of the following are true about Sets?

  1. Sets can contain null elements
  2. Sets can contain duplicate elements
  3. Set can contain atmost only one null element
  4. It contains an iterator() method
Question 11 Multiple Choice (Single Answer)

Which year the Regional Assembly language invented ?

  1. 1951
  2. 1957
  3. 1962
  4. 1960
Question 12 Multiple Choice (Single Answer)

Which year the LISP language invented ?

  1. 1958
  2. 1968
  3. 1948
  4. 1978
Question 13 Multiple Choice (Single Answer)

Which year the FACT language invented ?

  1. 1959
  2. 1968
  3. 1948
  4. 1978
Question 14 Multiple Choice (Single Answer)

Which year the COBOL language invented ?

  1. 1965
  2. 1953
  3. 1983
  4. 1959
Question 15 Multiple Choice (Single Answer)

Which year the APL language invented ?

  1. 1952
  2. 1953
  3. 1975
  4. 1962
Question 16 Multiple Choice (Single Answer)

Which year the Simula language invented ?

  1. 1954
  2. 1953
  3. 1961
  4. 1962
Question 17 Multiple Choice (Single Answer)

Which year the BASIC language invented ?

  1. 1955
  2. 1963
  3. 1983
  4. 1964
Question 18 Multiple Choice (Single Answer)

Which year the PL/I language invented ?

  1. 1957
  2. 1962
  3. 1963
  4. 1964
Question 19 Multiple Choice (Single Answer)

Which year the Pascal language invented ?

  1. 1958
  2. 1960
  3. 1971
  4. 1970
Question 20 Multiple Choice (Single Answer)

Which year the Prolog language invented ?

  1. 1965
  2. 1960
  3. 1972
  4. 1970