SQL, C and Java Programming Fundamentals

Test your knowledge of SQL queries, C programming concepts (pointers, memory management), and Java web development (servlets, JDBC, I/O)

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which interface is implemented by the services in order to pass configuration information to a Servlet when it first starts

  1. Structs Config
  2. WebXML
  3. ServletConfig
  4. None of the above
Question 2 Multiple Choice (Single Answer)

In JDBC ______________ used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.

  1. Class.forName
  2. Class.JDBCODBC
  3. Class.JdbcDriver
  4. Class.Loader
Question 3 Multiple Choice (Single Answer)

_________ method for posting the information in Action class

  1. doGet()
  2. doPost()
  3. execute()
  4. validate()
Question 4 Multiple Choice (Single Answer)

Which abstract class is the super class of all classes used for writing characters. Select the one correct answer.

  1. FileWriter
  2. CharWriter
  3. Writer
  4. OutputStream
  5. FileOutputStream
Question 5 Multiple Choice (Single Answer)

__________ will be automatically invoked when an object is created.

  1. method
  2. garbage collection
  3. finalizer
  4. Constructor
  5. none of the above
Question 6 Multiple Choice (Single Answer)

In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?

  1. It must have a package statement
  2. It must be named Test.java
  3. It must import java.lang
  4. It must declare a public class named Test
Question 7 Multiple Choice (Single Answer)

_____________ is the mechanism that servlets use to have a client hold a small amount of state information associated with the user.

  1. sessions
  2. HttpRequest
  3. HttpResponse
  4. Java Beans
  5. Cookies
Question 8 True/False

If you want to modify the servlet, The webserver need to be shutdown.

  1. True
  2. False
Question 9 True/False

Casting the return value from malloc function is necessary.

  1. True
  2. False
Question 10 Multiple Choice (Multiple Answers)

Which of the following functions is not present in ANSI standard?

  1. getchar();
  2. getche();
  3. ungetc();
  4. getch();
Question 11 Multiple Choice (Single Answer)

What is the scope of memory allocated with malloc function?

  1. Local to the file in which its allocated.
  2. Local to the function in which its allocated.
  3. Local to the block in which its allocated.
  4. Global
Question 12 Multiple Choice (Single Answer)

After we free an allocated memory block using free(), the pointer will become:

  1. null pointer
  2. wild pointer
  3. Dangling pointer
  4. None of the above
Question 13 Multiple Choice (Single Answer)

What is the following declaration for? int (*a)[10];

  1. Pointer to an array of 10 integers.
  2. A pointer to function returning an array of 10 integers.
  3. Array of 10 function pointers returning int
  4. Array of 10 integer pointers.
Question 14 Multiple Choice (Single Answer)

Consider the following declarations: int a[10]; int *p=a; Which among the following is portable way to print value of pointer p?

  1. printf("%d\n",p);
  2. printf("%u\n",p);
  3. printf("%lu",p);
  4. printf("%p\n",(void*)p);
Question 15 True/False

It is possible to compare two structures using == operator.

  1. True
  2. False
Question 16 True/False

It is possible to compare two structures using == operator.

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

Which is not a group function?

  1. Count
  2. Avg
  3. Total
  4. Max
Question 18 True/False

You can use Avg or Sum group functions for any numeric data?

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

COUNT (DISTINCT expr) returns

  1. No. of rows in a table
  2. No. of rows with non-null values of the expr
  3. No. of distinct non-null values of the expr
  4. . None of the above
Question 20 True/False

All columns in the SELECT list that are not there in the GROUP function, should be in the group by clause

  1. True
  2. False