Saturday, 10 January 2015

MCQ

            C OBJECTIVES



1.       One-dimensional array is known as-
               Vector,  matrix  ,               table,                    an array of arrays
Ans: vector

2.       If arr is a two dimensional array of 10 columns and 12 rows then arr[11] logically points to the-
11th column         12th column         11th row                12th row
Ans: 12th row

3.       In memory a 3-d array as shown below is stored as
Int arr[3][4][2]={{{2,4},{5,6},{9,8},{6,7}},
{{9,5},{6,2},(7,1},(1,8}},{{8,3},{3,9},{5,8},{5,1} }};
3-D array              2-D array              1-D array              single values
Ans:1-D array  (in grp many people ans-> single values,but I differ)

4.       Select the correct option that specifies the values within [] in array declaration
Size of array,      largest subscript value,  both a and b,     has no significance
Ans: size of array

5.       __________allocates initialized memory block in heap segment
Malloc(),              realloc(),              calloc(),                free()
Ans:calloc()

6.       Functions in c can be categorised into two types.
What is the correct option for the above statement?
-library functions & user defined functions
-header functions & user defined functions
-printf() function & scanf() function
-main and non main functions
Ans: A

7.       What would be size of following character array?
Void main()
{
Char c[]={‘a’,’e’,’I’,’o’,’u’};
Printf(“\n %d”,sizeof(c));
Getch();
}
0,            5,            6,            4
Ans: 5

8.       Size of char array
Char c[]=”AEIOU”;
0,            5,            6,            4
Ans: 6 (because it’s a string and hence null character would take 1 place at last)

9.       in the declaration main(int argc,char *argv[],char* envp[])which one represents the command line arguments
argc,      argv,      envp,    main
ans: argv

10.   ______is a conditional directive that allows a part of the program to be selected or ignored by pre-processor
#define,               #ifdef,  #include,             #condition
Ans: #ifdef

11.   Which condition is correct for checking empty queue? considering front=0
-          Front==rear && rear==MAX
-          Front==(rear+1)%MAX
-          Front==rear && front==-1
-          Front==0 && rear==0
Ans:  D

12.   Which Is correct recursive relation for factorial ?
Ans: F(n)=1
If n<=1
Or
n.F(n-1)
if n>1

13.   Find output for following program
#include<stdio.h>
int main()
{
int x='D';
char c=65;
if(x>c)
return (printf("%d",printf("%c%d",x,c)));
printf("Executed");
return 0;
}
Ans: D655

14.   Find output for following program
#include<stdio.h>
void main()
{
int i;
i=fact(4);
printf("\n %d",i);
getch();
}
int fact(int n)
{
n*fact(n-1);
if(n<=1)
return 1;
}
Ans: stack overflow error(segmentation fault occurs which is runtime error )(in wipro exam choose infinite loop option)

15.   Find output for program
Void main()
{
Char s[]=”hello”;
Char t[]=”Delhi”;
Strcat(t,s);
Printf(“\n%s”,s);
Printf(“\n%s”,t);
Getch();
}
Ans: hello
Delhihello
(actually it’s an undefined behaviour case which can get clear when some other variable exist after t[] and gets overwritten by strcat)

16.   Select incorrect statement about functions?
-more than one function allowed in a program
-a function can call itself
-constants can appear in the formal argument list
-a function can call another function
Ans: C

17.   In C, any function can be called from any other function. Even main() can be called from other functions.
Ans: True

18.   Find the output:
#include<stdio.h>
int main()
{
int arr[5],k=0;
while(k<5)
arr[k]=++k;
for(k=0;k<5;k++)
printf(“%d”,arr[k]);
return 0;
}
Ans: 01234

19.   Find the output
#include<stdio.h>
void main()
{
int i=3;
switch(i)
{
Default: printf(“zero”);
Case 1:printf(“one”);
Case 2:printf(“two”);
Case 3:printf(“three”);
}   }               
Ans: three

20.   Find output
Main()
{
Int x=3,y=5;
If(x==3)
Printf(“\n%d”,x);
Else;
Printf(“\n%d”,y);
}
 Ans: 3
5

21.   Pre-processor is used for
1.taking advantage of macros
2. invoking “compiler specific” features
Which statement is correct?
1,            2,            both 1 and 2,      either 1 or 2
Ans: both 1 and 2

22.   Assuming name is a member of a structure named data and given following declaration
struct data d;
which of the following is a valid expression?
d*name,              d.name,               d#name,              d%name
ans: d.name

23.   Which of the following is valid character constant?
“AEIOU”,             ‘AEIOU’,               ‘Y’,          All of the above
Ans: ‘Y’

24.   Select the valid format string?
%ld,       %lf,        %lu,       %lc
Ans: %lc (%ld is for long int,%lf for double,%lu for long unsigned but %lc is for nothing,ques should ask for invalid one)

25.   Find output for following?
#include<stdio.h>
Int main()
{
Printf(“%d%d%d”,sizeof(‘1’),sizeof(“1”),sizeof(1));
Return 0;
}
Ans:  424

26.   Which of the following is a valid string constant?
‘A’,         “A”,        A,            all
Ans: “A”

27.   Choose correct condition for recursion
Termination of algorithm,            key variable,      base value,         all
Ans: all

28.   Which statement is not true with regard to file pointer?
-holds character value
-it is one point access to file
-can be opened and closed any no. of times in a program for same file
-can be used to access data in a file
Ans:  A

29.   %lf stands for
Float,     double,                unsigned int,      long double
Ans: double

30.   Drawback of singly linked list
-finding address of previous node is difficult
-finding address of next node is difficult
-both
-traversing forward is very difficult
Ans: finding address of previous node is difficult

31.   Find the output:
void main()
{print(3+3+" arun kumar",prateek");
}
a.6arun kumarprateek
b.arunkumar prateek
c umarprateek
d.umar
ans: umar

32.   Which is not a pre-processor directive?
#if,         #else,    #endif, #ifelseif
Ans: #ifelseif

33.   an array passed as an argument to a function is interpreted as
-address of array
-values of 1st element in an array
-address of 1st element in an array
-no. of elements in an array
Ans: address of 1st element in an array

34.   find  output of the following program
#include <stdio.h>
int main()
{
   int i=-1,j=-1,k=-1,l=2,m;
   m=i++ || l++;
   printf("%d",m);
   return 0;
}
Option: 0,            1,            2,            3
Ans: 1

35.   If array elements are not given specific  values, they are supposed to contain garbage values
True/false
Ans: true

36.   If you do not initialize a static array, then what will be the default value set to the array element.
An undetermined value,              0,            1,            -1
Ans:  0

37.   A stack is implemented using linked list, where does push operation place new node?
-At the head.
- At the tail, 
-After all other entries that are greater than given, 
-After all other entries that are smaller than given
Ans: At the tail

38.   in main (int argc,char *argv[]) the argument argc represents
-array of the index of argv
-count of total no of arguments
-last index value
-all of above
Ans: count of total no of arguments

39.   find the output of following code:
char a[5]={97,99,101,103,105];
int i;
for (int i=0;i/,5;i+=2)
printf('%c',a[++i]);
printf(',%d', i);
ans:  ci,6

40.   2-D array elements are sorted in
Column Major order, Row Major Order, Both, Random order
Ans: row major order

41.   Find output:
void main()
{
char c[2]="i";
printf("\n%c",c[0]);
printf("%s",c);
getch();
}
Ans: ii

42.   how many parameters can be passed to main()
1, 2, 3, many             
Ans: 3 (A parameter is the variable which is part of the method’s signature (method declaration). An argument is an expression used when calling the method.)

43.   Opening a file in ios::out mode also opens it in which mode by default
ios::in, ios::trunc,  ios::no create,  ios::no replace
ans: ios::trunc

44.   if no arguments are passed to a cmd then argc will have
1, 0,  2,  total size of argv
Ans:  1  ( argv[0] holds the name of the program and argv[n] is a pointer to the n-th  command line argument, If no arguments are supplied, argc will be one, )

45.   In which of these does a continue statement takes the control directly to the test condition and then continue the looping process
for while,  while if else,   do while if else,   while and do while
ans: for while

46.   the expanded source generated by preprocessor becomes input to
loader, interpreter, compiler, linker
Ans: compiler

47.   which function(s) takes pointer to the memory block to be released or resized without the need for its size?
malloc(),  .malloc() and free(),   realloc(),  realloc() and free()
ans: realloc and free

48.   What does tail pointer point to with respect to linked list(with elements)
first node,   last node,   any node,   not defined
ans: last node

49.   Which of the following information is present in an error message produced by the compiler.
Name of the file compiled,       Line no. And column position of error,
Error code defined by compiler,      All of the above
Ans: all of the above

50.   Alternative to define preprocessor directives are
Enums,    structures,    unions,    storage classes    
ans: enums








C++ OBJECTIVES


1.       In case of arguments passed by values when calling a function such as a=subtract(x,y);
-any modifications to the variables x & y from inside the function will not have any effect outside the function
-the variables x & y will be updated when any modification is done in the function
-variables x& y are passed to the function subtract
-none of the above are valid
Ans: A

2.       Instance of which type of class can not be instantiated?
-a class that has no constructor
-a class that has no destructor
-a class that has at least one virtual member function
-a class that has at least one pure virtual function
Ans: D

3.       Class Person
{
Public:
Person(string &s,int a);
Private:
String name;
Int age;
};
If Person constructor uses initializer list to initialize members, which of the following is correct.
-Person::Person(string &s,int a):{name=s;age=a;}
-Person::Person(string&s,int a){name(s);age(a);}
-Person::Person(string&s,int a):name(s),age(a){ }
-Person::Person(string&s,int a):name(s);age(a);
Ans: Person::Person(string&s,int a):name(s),age(a){ }

4.       by default members of a class are
private,                protected,          public,                   not possible to define a member without access specifier
ans: private

5.       when does the following loop terminate?
Char c;
While(c=cin.get())
{
Cout.put(c);
}
-when end of file is encountered
-when a space character is encountered
-when end of line is encountered
-never
Ans:  never

6.       assuming the following code as part of a try block is executed
throw obj;
cout <<”after throw”<<endl;
when does the program print the ouput  “after throw” ?
-if an appropriate exception handler can be executed for the exception thrown
-if the exception turns out to be unhandled exception
-both a) and b)
-never
Ans: never
7.       an abstract class may contain
instant variables,              constructors,     extend another class,    all of the above
ans: all of the above

8.       c++ provides facility to specify that the compiler should match function calls with the correct definition at the run time.This process is called
static binding,    dynamic binding,              both
ans: dynamic binding

9.       a data member holds 1 or 0 depending on whether taxes have been paid. The best identifier for this member is
taxes,       paidTaxes,       taxesArePaid,    code
ans:  paidTaxes

10.   OOP’s advantages of inheritance include:
-providing a useful conceptual framework
-avoiding rewriting code
-facilitating class libraries
-all of these
Ans: all of these

11.   What do you understand by the term inheritance?
-it is same as encapsulation
-aggregation of information
-generalization and specialization
-all of these options
Ans:  generalization and specialization

12.   Which of the following statements is not correct?
-an inline function may not work if it contains a static value
-inline functions may not work if they are recursive
-an inline function can work if there is a loop,switch or goto
-inline functions are used to eliminate the cost of calls to small function
Ans:  C

13.   Which of the following is used to create the input stream?
Filebuf,    ifstream,          ofstream,            istream,               fstream
Ans:  istream

14.   The open mode of a file can combine two or more parameters by using:
-bitwise or operator,      bitwise and operator,    both  of the above,         open mode can’t combine 2 or more parameters
Ans:  bitwise or operator

15.   Which of the operators cannot be overloaded?
==(equality operator),   <,            ->,          :: (scope resolution operator),   none of these
Ans:  :: (scope resolution operator)

16.   Output for the mentioned code is:
#include<iostream.h>
void swap(int a,int b)
{
Int temp=a;
a=b;
b=temp;
cout<<”a:”<<a<<”,  b: “<<b<<”\n”;
}
void main()
{
Int a=5;
Int b=9;
cout<<”a:”<<a<<”,  b: “<<b<<”\n”;
swap(a,b);
cout<<”a:”<<a<<”, b: “<<b<<”\n”;
}
Ans:  a:5,  b: 9
a:9,  b: 5
a:5,  b: 9

17.   What is the outcome of the following code snippet?
string s;
cin>>s;
-reads one line from a file
-reads one word from a file
-reads one line from standard input
-reads one word from standard input
Ans: reads one word from standard input

18.   In case of pass by reference:
-the values of those variables are passed to the function so that it can manipulate them
-the location of variable in memory is passed to the function so that it can use the same memory area for its processing
-the function declaration should contain ampersand(&) in its type declaration
-all of the above
Ans:  C

19.   The type of variable a pointer points to must be part of the pointer’s definition so that:
-data types don’t get mixed up when arithmetic is performed on them
-pointers can be added to one another to access structure members
-the compiler can perform arithmetic correctly to access array elements
-both (i) and (iii)
Ans: D

20.   If arr is the name of an array, then how can we declare a pointer ptr to the array?
ptr=arr[0];           ptr=arr;                both of the above           we cannot declare pointers to arrays
ans: ptr=arr;

21.   What is wrong in the following line of code:
For(int m=2,m<4,m++) ?
-both the commas should be replaced by semicolons
-int m should be declared earlier
-there should be a semicolon at the end of for loop
-all of the above
Ans: both the commas should be replaced by semicolons

22.   Consider the structure declaration:
Struct Wardrobe{double collarSize; int waistSize;  int inseamSize; };
Wardrobe DadsClothing;
If doubles are four bytes and integers are two bytes,the amount of memory set aside by this declaration is:
-zero bytes,        four bytes,          eight bytes,        cannot be determined
Ans: eight bytes

23.   Two functions in the same source file can have same names:
True / False
Ans: True
24.   For a friend function keyword friend is used with
Function declaration,     function definition,         both,     not used
Ans: function declaration

25.   Which is not correct about method overloading?
-method overloading depends on the no. of parameters
-depends on data type of parameter
-depends on return type of method
-depends on the name of the method
Ans: depends on return type of method

26.   Which of the following can be used as access modifiers?
a)Private,            b) public,             c) protected,      d)default
-b,c,d
-a,b,c
-b,c
-all
Ans: a,b,c

27.   In c++, exception handler is defined by:
Try clause,           catch clause,      throw clause,     all of the above
Ans: catch clause

28.   What is the interpretation of the following code snippet?
String buf;
While (cin>>buf)
{
}
-reads each word of the first line into buf, till end of line
-reads entire line into buf and comes out of the loop
-each iteration reads one character of the input into buf, till end of file
-each iteration reads one word of the input into buf,till end
Ans: each iteration reads one word of the input into buf,till end

29.   Find the output of the following code snippet?
char *msg="hello world";
   cout << msg << endl;
   cout << *msg << endl;
   cout << (void *)msg << endl;
ans: hello world
h
address pointed by msg

30.   Assume base is a class and dummy is derived from it, if base has a private member function named print() ,then which is syntactically valid?
-print() is called on an instance of base class
-print() is called on an instance of dummy
-print() called by member function of dummy
-print() called by friend function of base
Ans: print() called by friend function of base

31.   The open mode of a file can combine 2 or more parameters by using:
Fstream,  iostream,   ios ,  none
Ans: ios
32.   Which modifier used in the field is accessible from all the classes
Public,  private,  inheritance,  all
Ans: public

33.   a local variable-
-can be used to answer in program
-is declared within method
-must accept a class
-represent a class object
Ans: is declared within method

34.   pick  block of code in which the code will be skipped post occurrence of an exception
try, catch, finally, Exception
ans: try
35.   eof() is a member function of ?
Ios,            fstream,           iostream,             none
Ans: ios

36.   Which one is correct?
-Terminate () calls unexpected ()
-Abort () calls unexpected ()
-Unexpected () calls abort ()
-Terminate ( ) calls abort ()
Ans: terminate () calls abort ()

37.   Pure virtual function is...
-Function declared in base class with no definition
-Function defined in derived class
-Both above
-None
Ans: Both above

38.   Assume class b is an abstract class which one is correct...
- b a,          b *pa,                                test (b& pa),      test (b a)
Ans: b *pa , test(b &pa)  (since a pointer and reference can be created for an abstract class)

39.   Variables in a structure are called:
-members,  super variables,   both,   none
Ans: members

40.   Which is correct for abstract class
-Can be instantiated, Can’t be inherited, Same as concrete class, Can’t create object for it, None
Ans: can’t create object for it

41.   Can two classes have member functions with the same name in C++
Yes,   no,     yes if classes have same name,    yes if main program does not declare both member functions
Ans: yes

42.   which is not derived data type?
Class,  function, reference,  array,  pointer
Ans: Class

43.   Which field types contain a fixed set of constants?
Class,  unum,  enum,  dnum
Ans: enum

44.   Virtual function is a ____
overloaded function, overridden function, function signature in interface, function signature in abstract class
Ans: overridden function

45.   Assume the function copy() is callled using two string objects, src and dest
copy(dest, src)
if it successfully copies src to dest, which of the following should be the most appropriate function prototype for copy
a. void copy(string dest, string src)
b. void copy(string dest, const string src)
c. void copy(const string dest, const string src)
d. void copy(const string dest, string src)
Ans:  void copy(string dest, const string src)

46.   Size of memory allocated to an object is determined at
Compile time,   Run time,   Time of coding,   Time of initializing
Ans: compile time

47.   Setw, setprecision on stream requires which header file
Iostream,       Fstream,   Iomanip,   Ssstream
Ans: iomanip

48.   Which will be change if Queue is implemented using linked list?
Rear,   front,   both,  none
Ans: both





UNIX OBJECTIVES



1.       In “bash” ,”if” constructs are ended with
Fi,           Endif,    End,       none of these
Ans: Fi
                                                                                                                                               
2.       The command cat x:
-creates an empty file x
-creates a file x and waits for user input
-is an invalid command
-none of the above
Ans: none of the above (cat x would display the content of file x)

3.       Which statement is true about daemon processes?
-they are not linked with a user or terminal
-they are constantly running in the background
-they are created when the system boots up
-all of the above
Ans: all of the above

4.       Which of these commands Is not a filter?
Sort,      grep,     cal,         cut
Ans:cal
                                                                                                                                                             
5.       What do you use to forward errors to a file?
2> filename,       1>filename,        2> /dev/null,      &>filename
Ans: 2>filename

6.       Which command is used to interactively delete files
rm,         rm -d,    rm -i,     rm –a
ans: rm –i

7.       The metacharacter * represents
-total no of users who have logged in
-value of the variable *
-number of processes running
-all the files in the current directory        
Ans: D

8.       which of these process properties is not retained when you set the program a process is executing with an  exec system call?
Process ID,          variable values,                 open file descriptors,     parent’s process ID
Ans: variable values

9.       which one will you use to make sure that a process is killed?
Kill -7,    kill -8,    kill -9,    kill -10
Ans: kill -9

10.   which of the following commands is used for recursive listing of files?
$ls –r,    $ls –R,   $ls-a,     $ls –F
Ans:  $ls –R

11.   which command is used to rename a file?
Ren,       rn,          mv,        mvdir
Ans: mv
12.   variable names should be
descriptive,        lowercase letters,            uppercase letters,           both  A  and C
ans: lowercase letters

13.   the default value of unmask command in file permissions is:
242,        700,        666,        022
Ans:  022

14.   how can you append the output of a command to a file?
a. command <> file
b. command < file
c. command <<file
d. command >> file
e. command > file
ans: D

15.   what are the default system permissions for a file?
777,        754,        666,        700
Ans: 666

16.   wc command when used without arguments
-gives warning message to input the filename
-waits for user to type in as input then displays counts for that input
-not a valid command
-none
Ans: waits for user to type in as input then displays counts for that input

17.   default permission bits of a file when it is created for the first time is controlled by
chmod value,     fmask value,      unmask value,   none
ans: unmask value (actual ans is umask value but assuming that typo is there in ques)

18.   which of the following unix utility are not commonly used to process regular expressions?
Grep,    cut,        sed,       awk
Ans: cut

19.   the cd command when used without arguments would?
-changes to next directory
-brings back to the previous directory
-brings back to home directory
-displays an error
Ans: brings back to home directory

20.   how can you add the write permission to the group and read permission to the others?
a-chmod g+w,o+r file
b-chmod a+r,g+x file
c-chmod ,g+x,o+r file
d-chmod u+x,g+r file
ans: chmod g+w,o+r file

21.   the permission –rwxr—r--  represents in octal expression:
777,        666,        744,        711
Ans: 744 ( r is 4,w is 2, x is 1)                         

22.   the array of environment variable is terminated by
0,            EOF,       null pointer,       null character
Ans: null pointer

23.   not equivalent to   wc <in > out
< out wc > in,             >out wc <in,                 wc >out >in,     < in wc  > out
Ans: < out wc > in 

24.   which system variable is used to store the PID of the current shell?
$$,           $!,               $%,      %$
Ans: $$

25.   Which command is used to break the output in two streams?
Tar,  tr,  tail,  tee
Ans: tee

26.   the mv command will change:
i-node number,   only the directory entry,                directory entry and the i-node,     none of the above
ans: only the directory entry

27.   with which command you can see what folder you are in
whereami,   pwd,  map,   place
ans: pwd

28.   with what command you can see your username
whoami,  me,  I,  pwd
ans: whoami

29.   which directory contains the directory and blocks special files in unix
etc,    bin,     dev,    temp
ans: dev

30.   how can we determine the exit status of the command or shell script that was last executed on the shell?
echo $0,    echo $?,      echo Exit,    echo $out
ans: echo $?

31.   cd will return exit status
1 for success,  1 for failure,  0 for failure,  none
Ans: 1 for failure

32.   Which Unix command allows to search one file or multiple files that contain a pattern?
find, grep, dc, search
ans: grep

33.   ________service offers the benefits of the centralised administration of configuration files of unix?
NIS,   NFS,   DHCP,   Telnet
Ans: NIS     (Network Information System is a Remote Procedure Call (RPC)-based client/server system that allows a group of machines within an NIS domain to share a common set of configuration files. This permits a system administrator to set up NIS client systems with only minimal configuration data and to add, remove, or modify configuration data from a single location.)

34.   what can be put into the first line of the script to make sure a script will use the C shell
 #!/bin/csh,  !/bin/csh,  #$/bin/csh,  $/bin/csh
Ans: #!/bin/csh

35.   Ln command used for ___
Ans: to create links to files.
36.   Which of the following Unix command will not take the user student 5 to this personal home directory?
cd,  cd /~ ,   cd ~  ,   cd ~student5
ans: cd /~

37.   which is not a system call
 chmod,   open,   lseek,   getc
ans: getc

38.   In Unix array value assigned is surrounded by
{},  [],  (),  $
Ans: ()

39.   Which of the following is not a file stream opened automatically in Unix system?
standard input,  standard terminal,        standard error,   standard output
ans: standard terminal

40.   Command to reveal details of user
w,  finger,  who,  detail             
ans: finger

41.   how to create a file in Unix without opening the file
cat file,  touch,  less,  more
ans: touch

42.   Which command is used to make a new directory
make,  cat,  touch,  mkdir
ans: mkdir

43.   which not a process state in Unix
running,   waiting,   zombie,  all
ans: waiting   (D-Uninterruptible sleep (usually IO),R -Running or runnable (on run queue),S -Interruptible sleep (waiting for an event to complete),T- Stopped, either by a job control signal or because it is being traced.     W -paging (not valid since the 2.6.xx kernel), X -dead (should never be seen), Z -Defunct ("zombie") process, terminated but not reaped by its parent)
44.   Suitable programming language used to substitute char in script
grep, sed,  awk,  char,  getit
ans: awk

45.   A null variable can be declared as
d=    ,        d=”” ,          both a and b ,       none of the above
Ans: both a and b






SQL OBJECTIVES

                                                                                                                                                                   
1.       data dictionaries are maintained by_________________
users,    oracle server,    DBA,      All of the above
ans: DBA

2.       what is the default display length of the DATE data type column?
7,            8,            9,            11
Ans: 9

3.       ___________makes the group function consider only non-duplicate values
ALL,        DISTINCT,            UNION,                                                none of the above
Ans: DISTINCT

4.       A field value can be found at the intersection of
Two tables,         a row and a column,                    two rows,               two columns
Ans: a row and a column

5.       Predict the output of the following query:
Select Empno,Ename,hiredate from emp where
Hiredate>01-Jan-81
-error
-All employees records whose hiredate is greater than 1st Jan 1981
- All employees records whose hiredate is greater than 1st Jan 2081
- All employees records whose hiredate is greater than or equal to 1st Jan 1981
Ans:  All employees records whose hiredate is greater than 1st Jan 1981 (because default date format In oracle sql is DD-MON-RR and hence previous century first two digits are used instead of like YYYY format)

6.       How many joining conditions are needed to join 10 tables?
7,            9,            1,            0
Ans: 9  (To join n no. of tables ,we require minimum n-1 join conditions )

7.       the maximum size for varchar2 datatype?
1000,     4000,     40000,   400
Ans: 4000

8.       select ‘a’,’b’ from dual
intersect
select ‘a’,’b’ from dual
a b,         A B,        0 rows retrieved,                          error
ans: a b

9.       use the ________operator to return all distinct rows selected by the first query, but not present in the second query result set
UNION,                                UNION ALL,                     MINUS,   INTERSECT
Ans: MINUS      

10.    find ouput of following query:
(given sal=2500 and Comm is NULL):
Select 12*Sal+Comm AnnualSal from emp where empno=1000;
3275,     3000,     1800,     NULL
Ans: NULL

11.   In Oracle which contains information of objects owned by other users that we have access to
USER_OBJECTS,                                ALL_OBJECTS, DBA_OBJECTS,     ALL
Ans: ALL_OBJECTS

12.   Illegal symbol for table name?
$,            #,            !,             _
Ans: !

13.   Which of the following is not set operator?
Union,  join,       minus,  intersect
Ans: join

14.   _______values are not ignored during duplicate checking in union:
Null,       0,            string,   date
Ans: NULL

15.   select ‘a’,’b’ from dual
minus
select ‘a’,’b’ from dual
a b,         A B,        0 rows retrieved,                          error
ans: 0 rows retrieved

16.   ________brings together data that is stored in different tables by specifying the link between them
Selection,            projection,          join,                    union
Ans: join

17.   Truncate is discussed under
DML,     DDL,       DCL,       TCL
Ans:  DDL

18.   Using select you can do:
Only selection,  selection and projection,          selection and join,              selection, projection and  join
Ans: selection, projection and join

19.   Which of the following statement is false regarding UNION and UNION ALL ?
-column name from the first query appears in the result for both
-duplicate rows are automatically eliminated in UNION not in UNION ALL
-the output is sorted in ascending order by default in UNION not in UNION ALL
-the output is sorted by default in both
Ans: the output is sorted by default in both

20.   the ANSI standard language for operating relational databases
structured query language,         standard query language,            strong query language, standardized query language
ans: structured query language

21.   command to modify a column in SQL
modify, alter,     update,                   none of these
ans: alter

22.   to temporarily store values we use _______
variables,             super variables,                                substitution variables,   no such thing is possible
ans: variables

23.   which statement is true about set operators
A: the data type of each column in the second query must match the data type of its corresponding column in the first query
B: the column names in second query must match with the first query
Ans:  A is true B is false

24.   What is the synonym for USER _CATALOG??
CAT, USER_TABLES,  Dictionary, catalog
Ans: CAT

25.   bring data together in diff tables by specifying link is
selection,  projection,  join,  union
ans: join

26.   Which sql statement is used for extracting data from database..
Extract,   select,   get,   open
Ans: select

27.   Which command is used to add the values for the newly inserted column
insert,  update,  merge,  all
ans: update

28.   GRANT and REVOKE are discussed in
DML, DDL,  DCL,  TCL
Ans: DCL

29.   How many columns can be created in long data type
1,32,255,unlimited
Ans: 1   

30.   Which command is used for modifying in sql?
Modify,   alter,  update,   none
Ans: modify

31.   What is the default display format of the DATE data type column?
DD-MM-YY, DD-MM-RR,  DD-MON-RR,  DD-MON-YYYY
Ans: DD-MON-RR







                                                                       
                                                                       



TESTING OBJECTIVES                                                                                          



1.       Big bang testing approach is commonly used in ____________ organizations
Large,    small,    non-profit oriented,                    non process oriented
Ans: non process oriented

2.       Layers of sandwich testing approach?
2,            3,            4,            5
Ans: 3

3.       Which of these is not white box method?
Statement coverage,     decision/condition coverage,     path coverage,  equivalence partitioning
Ans: equivalence partitioning

4.       A system has to be developed which checks the right age of voting, as the right age of vote is 18 years .which technique is more suitable for doing unit testing in dis scenario?
Condition coverage,       state coverage,             boundary value analysis,  equivalence class partition
Ans: boundary value analysis

5.       What is experience based testing technique type?
Path coverage,  error guessing,  adhoc testing,                   reactive testing
Ans: error guessing                        

6.       In which testing it is easier to locate and remove bug and enough to test thoroughly?
Big bang,              integrate,            unit,       sandwich
Ans: unit

7.       an effective document used for verification is:
review log,          bug report,         check list,            system log
Ans: review log

8.       Which testing is based on the program structure?
Glass box testing,            black box testing,             compatibility testing,      security testing
Ans: glass box testing

9.       Who controls the inspection meeting?
Author, reader, moderator,         inspector
Ans: moderator

10.   which of the following is not part of validation
Unit testing, system testing, acceptance testing,  static testing
Ans: static testing (verification is called static testing)

11.   testing is a ____ based activity
performance,    risk,        idea,      individual
Ans: performance

12.   you can use structure based technique to measure
Test cases, test coverage, lines of codes, test data
Ans: test coverage

13.   _______ is the process of evaluating a system or component based on its form, structure, content or documentation
Static testing, dynamic testing, cross browser testing, simple testing
Ans: static testing

14.   Form of functional testing:
Boundary value , usability testing, performance testing, security testing
Ans: Boundary value

15.   Test execution activities include:
Create test data,  design test script, test reporting,  all of the above
Ans: test reporting

16.   Static testing is the process of evaluating a system or component based on its:
Structure,  response time, throughput,  all of the above
Ans: structure

17.   There should be balance between ______ test cases
-Normal
-Abnormal
-Environmental
-All
Ans: All

18.   Post implementation review is also called
-Post mortem
-Milestone
-Outbound
-Inprocess
Ans: post mortem

19.   To prevent defects process must be...
Ans: Altered

20.   Boundary value analysis and cause effect graphing are methods of...
-White box testing
-Black box testing
-Compatibility testing
-Security testing
Ans: black box testing

21.   Which is more effective in large units of code ?
white box,   black box,   glass box,    none
ans: black box