1. Select a,b,c,d from vtable where b>2 and c<4 assuming you will execute the above query often ,changing only the values in the where clause ,what
could you do to improve efficiency ?
a.Create a database stored procedure with parameters to execute this statement
b.create an index on columns a&b
c.create a temporary table that contains the data and use triggers to maintain it
d.create a trigger that executes this statement and execute the trigger
2. Modern rdbms's perfom the following the following functionc except ______________.
a.Force column values in one table to match any of the values in a column of another table
b.automatically replicate data on another server
c.automatically create new indexes based on query history
d.prevent unauthorized users from accessing data at the firls level
3. Which is not the characteristics of a view ?
a.Consumes disk space for data
b.multiple tables
c.multiple rows
d.updateable
4. Rdbms triggers are typically bound to a _____________and one or more _____________
table, sql statement types
sql statement type, user
column, rows
user, tables
5. What relationship is resolved by an "intersectingâ or "associativeâ entity ?
Recursive
mandatory one to one
many to many
one to one
6. With every use of memory allocation function should be used to release allocated memory which is no longer needed ?
Dropmem()
dealloc()
release()
free()
7. Make a copy of file "upperâ in the directory two levels up .
Jump "2 upper
cp upper ./.
Cp upper "2/
none of the above
set - 2
some of the Questions
1. Class word
{
public:
word(const char*,int = 0);
};
referring to the sample code above what is the minimum number of arguments required to call the constructor ?
A) 0
b) 1
c) 2
d) 3
2. Which one of the following represents a correct and safe declaration of null ?
A) typedef((void *)0) null;
b) typedef null(char *)0;
c) #define null((void *0)
d) #define null((char*)0)
3. #include
referring to the sample code above ,which of the following could you use to make the standars
i/o stream classes accessible without requiring the scope resolution operator ?
A) using namespace std::iostream
b) using namespace std;
c) using namespace iostream ;
d) using iostream;
4. Which one of the following statements allocates enough space to hold an array of 10 integers
that are initialized to 0 ?
A) int *ptr = (int *) calloc(10,sizeof(int));
b) int *ptr = (int *) alloc( 10*sizeof(int));
c) int *ptr = (int *) malloc( 10*sizeof(int));
d) int *ptr = (int *)calloc(10*sizeof(int));
5. What function will read a specified number of elements from a file ?
A) fread()
b) readfile()
c) fileread()
d) gets()
6. What is the largest value an integer can hold in a standard c compiler ?
A) 32767
b) 65536
c) 2147483647
d) int_max
7. With every use of memory allocation function should be used to release allocated memory which is no longer needed ?
A) dropmem()
b) dealloc()
c) release()
d) free()
8. Int a=1;
int ab=4;
int main()
{
int b=3,a=2;
printf("%i*/%i*/%*/i",a,b,ab);
}
Aptitude section
1. A Question like a is engg. B is doctor c is artist etc then few condition related to them you have give Answer to 4 or 5 qs on these conditions.
2. Same as above with different data and conditions. Suggest you must go for these Questions coz in 3 or 4 mins you can Answer 7 or 8 qs
3. About 4 to 5 Questions on arranging 4 sentences to form a paragraph.
4. If father is three times as old as son. 5 years ago he was 4 times age of his son what is son age.