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)
Questions
Which interface is implemented by the services in order to pass configuration information to a Servlet when it first starts
- Structs Config
- WebXML
- ServletConfig
- None of the above
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.
- Class.forName
- Class.JDBCODBC
- Class.JdbcDriver
- Class.Loader
_________ method for posting the information in Action class
- doGet()
- doPost()
- execute()
- validate()
Which abstract class is the super class of all classes used for writing characters. Select the one correct answer.
- FileWriter
- CharWriter
- Writer
- OutputStream
- FileOutputStream
__________ will be automatically invoked when an object is created.
- method
- garbage collection
- finalizer
- Constructor
- none of the above
In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?
- It must have a package statement
- It must be named Test.java
- It must import java.lang
- It must declare a public class named Test
_____________ is the mechanism that servlets use to have a client hold a small amount of state information associated with the user.
- sessions
- HttpRequest
- HttpResponse
- Java Beans
- Cookies
If you want to modify the servlet, The webserver need to be shutdown.
- True
- False
Casting the return value from malloc function is necessary.
- True
- False
Which of the following functions is not present in ANSI standard?
- getchar();
- getche();
- ungetc();
- getch();
What is the scope of memory allocated with malloc function?
- Local to the file in which its allocated.
- Local to the function in which its allocated.
- Local to the block in which its allocated.
- Global
After we free an allocated memory block using free(), the pointer will become:
- null pointer
- wild pointer
- Dangling pointer
- None of the above
What is the following declaration for? int (*a)[10];
- Pointer to an array of 10 integers.
- A pointer to function returning an array of 10 integers.
- Array of 10 function pointers returning int
- Array of 10 integer pointers.
Consider the following declarations: int a[10]; int *p=a; Which among the following is portable way to print value of pointer p?
- printf("%d\n",p);
- printf("%u\n",p);
- printf("%lu",p);
- printf("%p\n",(void*)p);
It is possible to compare two structures using == operator.
- True
- False
It is possible to compare two structures using == operator.
- True
- False
Which is not a group function?
- Count
- Avg
- Total
- Max
You can use Avg or Sum group functions for any numeric data?
- True
- False
COUNT (DISTINCT expr) returns
- No. of rows in a table
- No. of rows with non-null values of the expr
- No. of distinct non-null values of the expr
- . None of the above
All columns in the SELECT list that are not there in the GROUP function, should be in the group by clause
- True
- False