Tag: programming languages

Questions Related to programming languages

  1. Functions

  2. Templates

  3. Function pointers

  4. Pointer of pointers


Correct Option: C
  1. strcat(str1,str2)

  2. str1.Append(str2)

  3. str1.CopyAtEnd(str2)

  4. str1=str1+str2


Correct Option: D
  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);


Correct Option: A
  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.


Correct Option: B
  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


Correct Option: D
  1. It can be used to join a maximum of three tables

  2. It can be used to restrict the number of columns used in a NATURAL join

  3. It can be used to access data from tables through equijoins as well as nonequijoins

  4. It can be used to join tables that have columns with the same name and compatible data types


Correct Option: B,D
  1. The numbers generated by a sequence can be used only for one table

  2. DELETE would remove a sequence from the database

  3. CURRVAL is used to refer to the last sequence number that has been generated

  4. When the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement


Correct Option: C,D
  1. They can contain a subquery within a subquery.

  2. They can return multiple columns as well as rows.

  3. They cannot contain a subquery within a subquery.

  4. They can return only one column but multiple rows.

  5. They can contain group functions and GROUP BY and HAVING clauses.

  6. They can contain group functions and the GROUP BY clause, but not the HAVING clause.


Correct Option: A,B,E