Paper1,2,3

34
1. The local variables are stored into ___________. A. code segment B. stack C. heap D. data segment 2. In top down programming -- i] Software is collection of modules ii] Module is a collection of functions A. both i] and ii] are not true B. both i] and ii] are true C. only i] is true D. only ii] is true 3. In which of the following kind of data manipulation, Array is preferred? A. All B. Data accessibility C. Data deletion D. Data insertion 4. Which among the following statements is correct? A. A function should contain a return statement B. A function should contain only one return statement and it should be the last statement of the function C. A function should contain only one return statement D. A function can have any number of return statements, but only one among those will get executed in a call 5. Unit Testing typically tests A. Interfaces of the module B. Functionality of the module C. Integration of the module

Transcript of Paper1,2,3

Page 1: Paper1,2,3

1. The local variables are stored into ___________.

A. code segment

B. stack

C. heap

D. data segment

2. In top down programming --

i] Software is collection of modules

ii] Module is a collection of functions

A. both i] and ii] are not true

B. both i] and ii] are true

C. only i] is true

D. only ii] is true

3. In which of the following kind of data manipulation, Array is preferred?

A. All

B. Data accessibility

C. Data deletion

D. Data insertion

4. Which among the following statements is correct?

A. A function should contain a return statement

B. A function should contain only one return statement and it should be the last statement of the function

C. A function should contain only one return statement

D. A function can have any number of return statements, but only one among those will get executed in a call

5. Unit Testing typically tests

A. Interfaces of the module

B. Functionality of the module

C. Integration of the module

D. Non- functionality of the module

Page 2: Paper1,2,3

6. The function strcmp will return _________ if the two strings are same

A. 1

B. -1

C. any non-zero integer

D. 0

7. Which of the following statements is true

Statement 1: break statement is used to end the processing of a particular case statement and the control is transferred to the end of switch statement.

Statement 2: the type of switch expression and the case constant-expression must be integral.

A. Both the statements are correct.

B. Only statement 2 is correct.

C. Both the statements are false.

D. Only statement 1 is correct

8. A function definition in a C program

A. Must have a body having at least one statement

B. Must have arguments

C. Must have a return statement

D. All

9. Which of the following are the deliverable artifacts of the Requirement Analysis phase of SDLC?

A. Both System Test Plan and Integration Test Plan

B. SRS, System Test Plan and Acceptance Test Plan

C. Both SRS and Unit Test Plan

D. Both Unit Test Plan and System Test Plan

10. For testing a function that should take an integer between 3 and 7 as the input, the tester uses the following test cases - One integer less than 3, one integer between 3 and 7 and one integer greater than 7. The test cases are generated using __________

A. Random Generation

B. Equivalence Class Partitioning

C. Boundary Value Analysis

D. Error Guessing

Page 3: Paper1,2,3

11. Which one of the following statements about pointer is FALSE?

A. Pointer variables do have data types.

B. Pointer variable is used to hold the address

C. The sizes of all types of pointer variables are different

D. No memory is allocated for pointer variable

12. What is the output of the following program?

#include

#define N 4

main( )

{

int a[N] = { 2, 3 } ;

int b[N-5];

}

A. program compiles, but gives a run time error

B. compile error: array cannot have negative subscript

C. compile error: array not initialized

D. compile error: array size cannot be a symbolic constant

13. Choose the correct function call from the following information?

int Arr[10];

int Max( int a[], int k); //fuction prototype

A. Max(Arr[], 2)

B. int Max(Arr[], 2)

C. Max (Arr[10],2)

D. Max(Arr, 2)

14. "An integer element k is to be searched in a sorted array of integers of size 1024 using binary search the maximum number of comparisons would be "

A. 10

B. 2 power 1024

C. 512

D. 1024

Page 4: Paper1,2,3

15. Which of the following Coding principle is violated if we use goto statements in the code?

A. Follow structured programming constructs

B. Keep conditional logic as simple as possible

C. Select data structures that will meet the objectives of the design

D. Create simple nested loops that are not very complicated

16. What is the CORRECT order of the execution of phases of Software Development Life Cycle?

A. Requirement Analysis, Design, Coding, Testing, Maintenance

B. Requirement Analysis, Design, Maintenance, Testing, Coding

C. Requirement Analysis, Design, Testing, Coding, Maintenance

D. Requirement Analysis, Design, Maintenance, Coding, Testing

17. If p and q are assigned the values 2 and 3 respectively. Then the statement p = q++

A. assigns a value 3 to p

B. assigns a value 4 to p

C. assigns a value 5 to p

D. gives an error message

18. Primitive data types supported in C language are

A. int, signed int, unsigned int, long int

B. int, long int, char, unsigned char

C. int , char, string, float

D. char, int, float, double

19. Choose the correct alternative:

Global Variables are stored in

A. queue

B. static area reserved by compiler

C. stack

D. register

20. What does the term 'call-by-reference' refer to?

A. Passing address to a variable into a function.

B. Passing a copy of a variable into a function.

Page 5: Paper1,2,3

C. Choosing a random value for a variable.

D. A function that does not return any values

21. The parameters that are used in function call are ____________ parameters and those in the function declaration are called __________________ parameters.

A. static, dynamic

B. dynamic, static

C. formal, actual

D. actual, formal

22. Which of the following control statements comes under entry controlled.

i ) for

ii)while

iii)do while

A. i & iii

B. i ,ii ,iii

C. i & ii

D. ii & iii

23. which of the following statements is false?

A. Simple variables can store a collection of elements with the same type.

B. Array variables can store a collection of elements with the same type.

C. Simple variables can store a single value.

D. Pointer variables can point to other variables

24. Which of the following is an illegal value for the case in a switch block?

A. -200

B. 1

C. 100

D. a

25. What is the output of the following program?

#include

f()

Page 6: Paper1,2,3

{

return 10;

}

void main()

{

printf("%d",f(10,20,30));

printf("%d",f(10,20));

}

A. runtime error

B. 0

C. compilation error

D. 10, 10

26. Function in C has one of the following structure

A. name(number of parameters, actual parameters)

B. type name (number of parameters, formal parameters) { statements}

C. name(number of parameters, formal parameters)

D. type name (formal parameters) { statements}

27. Result of the following program is

main()

{ int i=0;

for(i=0;i<20;i++)

{

switch(i)

{ case 0:i+=5;

case 1:i+=2;

case 5:i+=5;

default i+=4;

break; }

printf("%d,",i);}}

A. 5,9,13,17

Page 7: Paper1,2,3

B. 12,17,22

C. syntax error

D. 16,21

28. Choose the correct loop to find the sum of the elements at odd indexes in an array of size 10. Assume all required variables are declared and initialized appropriately

A. for(i=1;i<=9;i+=2) { sum += arr[i]; }

B. for(i=0;i<10;i+=2) { sum += arr[i++]; }

C. for(i=1;i<=10;i++) { sum += arr[i++]; }

D. for(i=0;i<=10;i++) { sum += arr[i]; }

29. What will be the output of following code?

1. int i=23,j=4,c=0;

c=i++-++j;

printf("%d %d %d",i,j,c);

A. 24 5 19

B. 24 4 20

C. 23 5 18

D. 24 5 18

30. What is the output of the following program?

#include

int a = 10;

void main()

{

int a=20;

{

printf("a= %d " , a);

}

}

A. junk value is printed

B. a= 10

C. a= 20

D. a=0

Page 8: Paper1,2,3

31. In the traditional file based approach of data storage, the same data may have to be stored in more than one place. This is the issue of

A. Duplication

B. Abstraction

C. Redundancy

D. Polymorphism

32. If every non-key attribute is functionally dependent on the primary key , then the relation will be in

A. BCNF

B. 1 NF

C. 3 NF

D. 2 NF

33. If one employee can become the head of a department, then employee participation in the relation is

A. Partial

B. In-Complete

C. Total

D. Complete

34. The concept of locking can be used to solve the problem of

A. uncommitted dependency

B. All of these

C. update

D. deadlock

35. Which of the following is a structure that provides faster access to the rows of a table based on the values of one or more columns?

A. Table

B. Triggers

C. Index

D. View

36. In the relationship Prescription connects Doctor, patient, medicine. This is an example of

Page 9: Paper1,2,3

A. one-to one relationship

B. Ternary relationship

C. Unary relationship

D. Binary relationship

37. Dept No is the primary key of the Dept Table. Dept No is ___________ key of the Employee table

A. Super Key

B. Next key

C. Foreign key

D. Native key

38. Age of a student can be calculated from students' date of birth. Age is

A. Both Stored attribute and Derived attribute

B. Stored attribute

C. Derived attribute

D. Arrived attribute

39. "A user 'X' submits 'n' number of tasks together for processing. This kind of Processing is known as"

A. On line processing

B. Off line processing

C. Group processing

D. Batch processing

40. The employee salary should not be greater than Rs. 2000. This is

A. feasible constraint

B. integrity constraint

C. over-defined constraint

D. referential constraint

41. Suppose in a relation we want to make sure that at any point of time all values corresponding to some set of attributes are existing in some other tables. This can be achieved using

A. Time stamping

B. Tuple integrity

C. Referential integrity

Page 10: Paper1,2,3

D. Xlocks

42. Normalization is based on _________________foundation

A. Geographical

B. Physical

C. Logical

D. Mathematical

43. Concurrency means allowing different transactions to execute

A. Differently

B. simultaneously

C. sequentially

D. One after other

44. A primary key if combined with a foreign key creates

A. network model between the tables that connect them

B. parent child relationship between the tables that connect them

C. One-to many relationship between the tables that connect them

D. many-to many relationship between the tables that connect them

45. Deferred update and immediate update are two techniques of

A. mutual exclusion

B. Locking

C. Timestamping

D. deadlock

46. In the hierarchical model the relationship between records is expressed as ______.

A. unique key for each record

B. Trees

C. pointers or links

D. parent-child

47. ._______object is used to increase the performance of data retrieval and there by provide faster access path to the table

Page 11: Paper1,2,3

A. index

B. view

C. synonym

D. sequence

48. If you design table using ER modeling, it will always be in

i) 1 NF ii) 2NF iii) 3NF iv) BCNF

A. All of i, ii, iii & iv

B. Only i

C. only ii

D. only i & iii

49. ________ removes transitive dependencies

A. 3 NF

B. 2 NF

C. BCNF

D. 1 NF

50. A relation schema is considered to be in 1 NF if all of its attributes are

A. Multivalued

B. Both Primary keys and Single valued

C. Single valued

D. Primary keys

51. "log" registry of DBMS contains

A. log in time of users

B. Data Base modifications

C. user names

D. creation time of Data Base

52. Data about data stored in Database is called

A. Inconsistent data

B. Raw data

C. Redundant data

Page 12: Paper1,2,3

D. Meta data

53. Which of the following is not the DDL command?

A. ALTER

B. CREATE

C. UPDATE

D. DROP

54. Which of the following statements are true to view the structure of the table

A. Describe Table_Name

B. Desc table Table_Name

C. Desc Table_Name

D. Both Desc table Table_Name and Desc Table_Name

55. Data items grouped together for storage purposes are called a

A. title list

B. list

C. record

D. string

56. Relationship which relates 2 entities of same entity type is called

A. Ternary Relationship

B. Unary Relationship

C. Recursive Relationship

D. Binary Relationship

57. Which of the following is not a DDL command?

A. Commit

B. Alter

C. Truncate

D. Create

58. Derived attribute is based on another

A. relations

Page 13: Paper1,2,3

B. entities

C. tables

D. Attribute

59. The one to many relationship existing between 'Parent' & 'Child' entities is a

A. relationship

B. network

C. chain

D. tree

60. EMPLOYEE table has the following data

EMP_IDEMP_SALARY EMP_COMM

------- --------- --------

8723 1230 200

4357 2390 null

9823 2000 100

2737 2030 120

What is the result of the following expression

Select sum (EMP_SALARY)+sum (EMP_COMM) from EMPLOYEE

A. 420

B. 7650

C. 8070

D. NULL

Page 14: Paper1,2,3

Paper21. In which of the following loop, the continue statement transfers the control to the increment step? A. if condition B. do while C. for D. while 2. Usage of functions makes the code A. All B. Easy to debug and maintain C. Reusable D. Modular 3. In top down programming --

i] Software is collection of modulesii] Module is a collection of functions A. only ii] is true B. both i] and ii] are not true C. only i] is true D. both i] and ii] are true 4. In which of the following kind of data manipulation, Array is preferred? A. Data deletion B. All C. Data insertion D. Data accessibility 5. Unit Testing typically tests A. Integration of the module B. Interfaces of the module C. Non- functionality of the module D. Functionality of the module 6. The use of continue statement is - A. to ignore the remaining statements of the loop for that iteration B. to ignore rest of the task and takes program control out of the main function C. to continue from the first line of the program D. to take the program control out of the loop 7. The function strcmp will return _________ if the two strings are same A. 1 B. any non-zero integer C. 0 D. -1 8. Which of the following statements is trueStatement 1: break statement is used to end the processing of a particular case statement and the control is transferred to the end of switch statement.Statement 2: the type of switch expression and the case constant-expression must be integral. A. Only statement 2 is correct. B. Both the statements are correct. C. Only statement 1 is correct D. Both the statements are false. 9. Sequence of instructions, which manipulated global data and as size increases, code becomes more complex to maintain isa)Unstructuredb)Procedural programmingc)Object oriented programming A. Only a B. Both b &c C. Both a & b D. Only b

Page 15: Paper1,2,3

10. In passing arguments via reference, A. the value of the actual argument within the calling routine will not change B. changes made to the formal arguments will affect the actual arguments C. the value of the actual argument is copied into the formal argument D. the value of the corresponding formal argument can be altered within that function. 11. String is stored in C language as A. An array of characters with the first byte containing the string length B. A variable of datatype string C. An array of integers with MS byte for the attribute and LS byte for the ASCII value D. An array of characters terminated by a NULL byte 12. What is the output of the following program?#include#define N 4main( ){int a[N] = { 2, 3 } ;int b[N-5];} A. program compiles, but gives a run time error B. compile error: array cannot have negative subscript C. compile error: array not initialized D. compile error: array size cannot be a symbolic constant 13. Choose the correct function call from the following information?int Arr[10];int Max( int a[], int k); //fuction prototype A. Max(Arr, 2) B. Max(Arr[], 2) C. Max (Arr[10],2) D. int Max(Arr[], 2) 14. What is the CORRECT order of the execution of phases of Software Development Life Cycle? A. Requirement Analysis, Design, Testing, Coding, Maintenance B. Requirement Analysis, Design, Coding, Testing, Maintenance C. Requirement Analysis, Design, Maintenance, Coding, Testing D. Requirement Analysis, Design, Maintenance, Testing, Coding 15. "An integer element k is to be searched in a sorted array of integers of size 1024 using binary search the maximum number of comparisons would be " A. 2 power 1024 B. 1024 C. 512 D. 10 16. Which of the following are infinite loops?Assume the variables are declared properlyi] for(i=0;i<5; )printf("hai");

ii] i=1;while(i < 5){--i;}

iii] i=10;while(i)--i; A. i] only B. i], ii] and iii] C. i] and iii] only

Page 16: Paper1,2,3

D. i] and ii] only 17. What does the term 'call-by-reference' refer to? A. A function that does not return any values B. Passing address to a variable into a function. C. Choosing a random value for a variable. D. Passing a copy of a variable into a function. 18. The parameters that are used in function call are ____________ parameters and those in the function declaration are called __________________ parameters. A. formal, actual B. dynamic, static C. actual, formal D. static, dynamic 19. If p and q are assigned the values 2 and 3 respectively. Then the statement p = q++ A. assigns a value 4 to p B. assigns a value 5 to p C. assigns a value 3 to p D. gives an error message 20. Primitive data types supported in C language are A. int, long int, char, unsigned char B. int , char, string, float C. char, int, float, double D. int, signed int, unsigned int, long int 21. Choose the correct alternative:Global Variables are stored in A. static area reserved by compiler B. register C. queue D. stack 22. Which of the following control statements comes under entry controlled.i ) forii)whileiii)do while A. i & iii B. i & ii C. i ,ii ,iii D. ii & iii 23. Read the following statements and choose the correct onei] Array is always 'pass by reference' in function call .ii] Array is always 'pass by value' in fuction calliii] String can be represented by an array of characters.iv] String is always terminated by ' A. only ii],iii]and iv] are correct B. only ii] and iv] are correct C. only i] and iv] are correct D. only i], iii] and iv] are correct 24. Function in C has one of the following structure A. name(number of parameters, actual parameters) B. type name (formal parameters) { statements} C. type name (number of parameters, formal parameters) { statements} D. name(number of parameters, formal parameters) 25. Which of the following is an illegal value for the case in a switch block? A. -200 B. 1 C. a D. 100

Page 17: Paper1,2,3

26. Result of the following program ismain(){ int i=0;for(i=0;i<20;i++){switch(i){ case 0:i+=5;case 1:i+=2;case 5:i+=5;default i+=4;break; }printf("%d,",i);}} A. syntax error B. 16,21 C. 5,9,13,17 D. 12,17,22 27. What is the output of the following program?#includef(){return 10;

}

void main(){printf("%d",f(10,20,30));printf("%d",f(10,20));} A. runtime error B. 0 C. compilation error D. 10, 10 28. Choose the correct loop to find the sum of the elements at odd indexes in an array of size 10. Assume all required variables are declared and initialized appropriately A. for(i=1;i<=9;i+=2) { sum += arr[i]; } B. for(i=1;i<=10;i++) { sum += arr[i++]; } C. for(i=0;i<=10;i++) { sum += arr[i]; } D. for(i=0;i<10;i+=2) { sum += arr[i++]; } 29. What is the value of array[0] after the execution of the program ?#includevoid f(int n);main(){int array[0] = -1;f(array[0]);}void f(int n){if( n < 0)n = -n;} A. Can't allocate an array of constant size 0 B. -1 C. 1 D. Undefined value 30. What is the output of the following program?#includeint a = 10;

Page 18: Paper1,2,3

void main(){int a=20;{printf("a= %d " , a);}} A. a= 20 B. junk value is printed C. a= 10 D. a=0 31. The concept of locking can be used to solve the problem of A. update B. uncommitted dependency C. All of these D. deadlock 32. Age of a student can be calculated from students' date of birth. Age is A. Arrived attribute B. Derived attribute C. Both Stored attribute and Derived attribute D. Stored attribute 33. In the traditional file based approach of data storage, the same data may have to be stored in more than one place. This is the issue of A. Polymorphism B. Duplication C. Redundancy D. Abstraction 34. "A user 'X' submits 'n' number of tasks together for processing. This kind of Processing is known as" A. On line processing B. Off line processing C. Group processing D. Batch processing 35. If every non-key attribute is functionally dependent on the primary key , then the relation will be in A. 3 NF B. BCNF C. 2 NF D. 1 NF 36. If one employee can become the head of a department, then employee participation in the relation is A. Complete B. In-Complete C. Partial D. Total 37. In the relationship Prescription connects Doctor, patient, medicine. This is an example of A. Ternary relationship B. Unary relationship C. Binary relationship D. one-to one relationship 38. Dept No is the primary key of the Dept Table. Dept No is ___________ key of the Employee table A. Super Key B. Next key C. Native key D. Foreign key 39. Which of the following is a structure that provides faster access to the rows of a table based on the values of one or more columns?

Page 19: Paper1,2,3

A. Index B. Triggers C. Table D. View 40. Suppose in a relation we want to make sure that at any point of time all values corresponding to some set of attributes are existing in some other tables. This can be achieved using A. Xlocks B. Referential integrity C. Tuple integrity D. Time stamping 41. In the hierarchical model the relationship between records is expressed as ______. A. Trees B. pointers or links C. parent-child D. unique key for each record 42. Database backup and recovery mechanisms are framed by A. End user B. Programmer C. Database Administrator D. Database designer 43. Which data model is independent of both the DBMS software and the hardware? A. Conceptual B. External C. Internal D. All 44. The data flow model of an application mainly shows A. Processing requirements and the flow of data B. Decision and control information. C. Communication network structure D. The underlying data and the relationships among them 45. Duplicating (ie.making a copy) of the log file is done to recover from A. Power failure B. Operating Systems failure C. Application failure D. Media failure 46. Which of the following is a column in a table that uniquely identifies the records from a different table? A. Primary Key B. Foreign Key C. Candidate Key D. Intelligent Key 47. Which of the following statement is used to modify a table? A. MODIFY TABLE B. UPDATETABLE C. ALTER TABLE D. All 48. A relation schema is considered to be in 1 NF if all of its attributes are A. Multivalued B. Primary keys C. Single valued D. Both Primary keys and Single valued 49. Relationship which relates 2 entities of same entity type is called A. Unary Relationship B. Recursive Relationship

Page 20: Paper1,2,3

C. Ternary Relationship D. Binary Relationship 50. In the ER modeling of student database talent is indicated by a double lined ellipse. Talent is A. Composite attribute B. Weak attribute C. Multivalued attribute D. Primary attribute 51. The employee salary should not be greater than Rs. 2000. This is A. over-defined constraint B. referential constraint C. feasible constraint D. integrity constraint 52. A data model is a collection of conceptual tools for describing A. data, data relationship, data semantics and consistency constraints B. data and data relationships C. data semantics and consistency constraints D. All of these 53. Which of the following statements are true to view the structure of the table A. Desc Table_Name B. Describe Table_Name C. Desc table Table_Name D. Both Desc table Table_Name and Desc Table_Name 54. A primary key if combined with a foreign key creates A. network model between the tables that connect them B. many-to many relationship between the tables that connect them C. parent child relationship between the tables that connect them D. One-to many relationship between the tables that connect them 55. Which of the following is true of a network structure? A. It allows a many-to-many relationship B. It is a physical representation of the data C. It will be the dominant database of the future D. It is conceptually simple 56. Redundancy is dangerous as it is a potential threat to data A. Integrity B. atomicity C. Sufficiency D. Consistency 57. The one to many relationship existing between 'Parent' & 'Child' entities is a A. tree B. relationship C. network D. chain 58. File system which stores all files at the same level A. Network system B. Group file system C. Hierarchical system D. Flat file system 59. If name can be split into first name and last name then name is ___________ attribute A. Multi B. Single C. Simple D. Composite 60. EMPLOYEE table has the following data

Page 21: Paper1,2,3

EMP_IDEMP_SALARY EMP_COMM------- --------- --------8723 1230 2004357 2390 null9823 2000 1002737 2030 120

What is the result of the following expressionSelect sum (EMP_SALARY)+sum (EMP_COMM) from EMPLOYEE A. NULL B. 8070 C. 7650 D. 420

Page 22: Paper1,2,3

1. A function definition in a C programA. AllB. Must have argumentsC. Must have a return statementD. Must have a body having at least one statement

2. In top down programming --

i] Software is collection of modulesii] Module is a collection of functionsA. both i] and ii] are not trueB. only i] is trueC. both i] and ii] are trueD. only ii] is true

3. The use of continue statement is -A. to ignore rest of the task and takes program control out of the main functionB. to ignore the remaining statements of the loop for that iterationC. to take the program control out of the loopD. to continue from the first line of the program

4. Which of the following statements is trueStatement 1: break statement is used to end the processing of a particular case statement and the control is transferred to the end of switch statement.Statement 2: the type of switch expression and the case constant-expression must be integral.A. Only statement 1 is correctB. Only statement 2 is correct.C. Both the statements are false.D. Both the statements are correct.

5. Which is not a good programming practice?A. Writing test cases for the requirements specifiedB. Breaking a given task into sub-tasks and writing separate modules for each sub-taskC. Writing a for loop to visit elements of an array without bounds checkingD. Carrying out detailed analysis and design before writing code

6. In which of the following kind of data manipulation, Array is preferred?A. Data insertionB. Data accessibilityC. Data deletionD. All

7. Which of the following is true while using break statementA. AllB. can be used anywhere in the programC. can be used only in loops or switchD. can be used only within the loops

8. Usage of functions makes the codeA. AllB. Easy to debug and maintainC. ModularD. Reusable

9. "In a code, consider a character type variable being divided by an integer value." This situation described above leads to __________A. no compilation errorB. lexical errorC. syntatic error

Page 23: Paper1,2,3

D. semantic error

10. Variables that are both alive and active throughout the entire program are known asA. Local variableB. NoneC. static variableD. Global Variable

11. Which one of the following statements about pointer is FALSE?A. Pointer variable is used to hold the addressB. Pointer variables do have data types.C. The sizes of all types of pointer variables are differentD. No memory is allocated for pointer variable

12. Choose the correct function call from the following information?int Arr[10];int Max( int a[], int k); //fuction prototypeA. Max (Arr[10],2)B. Max(Arr[], 2)C. int Max(Arr[], 2)D. Max(Arr, 2)

13. What is the output of the following program?#include#define N 4main( ){int a[N] = { 2, 3 } ;int b[N-5];}A. compile error: array size cannot be a symbolic constantB. program compiles, but gives a run time errorC. compile error: array cannot have negative subscriptD. compile error: array not initialized

14. Which option does not come under Code Tuning Techniques?A. Using sentinelsB. Unrolling of LoopsC. Jamming the LoopD. Use if-then-else statements instead of case statements

15. Which among the following is NOT a pre-requisite for code review ?A. The developer who has written the code should have unit tested the code which is to be reviewedB. The code should have been written with proper coding standards and commentsC. Integration test should have been done to test the integrity of the code with the total system to which it is to be linkedD. The code to be reviewed should have zero compilation errors and warnings

16. Too many recursive calls may result into stack overflow.A. None of theseB. TRUEC. FALSED. Can't say

17. The parameters that are used in function call are ____________ parameters and those in the function declaration are called __________________ parameters.A. formal, actualB. dynamic, static

Page 24: Paper1,2,3

C. actual, formalD. static, dynamic

18. Choose the correct alternative:Global Variables are stored inA. stackB. static area reserved by compilerC. queueD. register

19. If p and q are assigned the values 2 and 3 respectively. Then the statement p = q++A. gives an error messageB. assigns a value 3 to pC. assigns a value 5 to pD. assigns a value 4 to p

20. Primitive data types supported in C language areA. int, signed int, unsigned int, long intB. int , char, string, floatC. char, int, float, doubleD. int, long int, char, unsigned char

21. What does the term 'call-by-reference' refer to?A. A function that does not return any valuesB. Choosing a random value for a variable.C. Passing a copy of a variable into a function.D. Passing address to a variable into a function.

22. Which of the following control statements comes under entry controlled.i ) forii)whileiii)do whileA. i & iiiB. ii & iiiC. i & iiD. i ,ii ,iii

23. Individual structure member can be initialized in the structure itselfA. None of these optionsB. FalseC. Compiler dependentD. TRUE

24. Result of the following program ismain(){ int i=0;for(i=0;i<20;i++){switch(i){ case 0:i+=5;case 1:i+=2;case 5:i+=5;default i+=4;break; }printf("%d,",i);}}A. 5,9,13,17B. 12,17,22C. 16,21D. syntax error

Page 25: Paper1,2,3

25. Which of the following is an illegal value for the case in a switch block?A. 1B. -200C. aD. 100

26. What is the output of the following program?#includef(){return 10;

}

void main(){printf("%d",f(10,20,30));printf("%d",f(10,20));}A. compilation errorB. 10, 10C. 0D. runtime error

27. Function in C has one of the following structureA. name(number of parameters, formal parameters)B. type name (formal parameters) { statements}C. name(number of parameters, actual parameters)D. type name (number of parameters, formal parameters) { statements}

28. What will be the output of the following program# includemain(){int index;int i;for (i=0; i < 10; i++)index = index + 1;printf("%d", index);}A. 0B. 10C. 9D. Can be any value

29. What is the value of array[0] after the execution of the program ?#includevoid f(int n);main(){int array[0] = -1;f(array[0]);}void f(int n){if( n < 0)n = -n;}

Page 26: Paper1,2,3

A. Undefined valueB. -1C. 1D. Can't allocate an array of constant size 0

30. Choose the correct loop to find the sum of the elements at odd indexes in an array of size 10. Assume all required variables are declared and initialized appropriatelyA. for(i=1;i<=9;i+=2) { sum += arr[i]; }B. for(i=0;i<10;i+=2) { sum += arr[i++]; }C. for(i=0;i<=10;i++) { sum += arr[i]; }D. for(i=1;i<=10;i++) { sum += arr[i++]; }

31. "A user 'X' submits 'n' number of tasks together for processing. This kind of Processing is known as"A. Off line processingB. On line processingC. Group processingD. Batch processing

32. Dept No is the primary key of the Dept Table. Dept No is ___________ key of the Employee tableA. Foreign keyB. Next keyC. Native keyD. Super Key

33. In the traditional file based approach of data storage, the same data may have to be stored in more than one place. This is the issue ofA. PolymorphismB. RedundancyC. DuplicationD. Abstraction

34. In the relationship Prescription connects Doctor, patient, medicine. This is an example ofA. Binary relationshipB. Ternary relationshipC. Unary relationshipD. one-to one relationship

35. The concept of locking can be used to solve the problem ofA. updateB. deadlockC. All of theseD. uncommitted dependency

36. If every non-key attribute is functionally dependent on the primary key , then the relation will be inA. 2 NFB. 3 NFC. 1 NFD. BCNF

37. Which of the following is a structure that provides faster access to the rows of a table based on the values of one or more columns?A. IndexB. ViewC. TableD. Triggers

Page 27: Paper1,2,3

38. If one employee can become the head of a department, then employee participation in the relation isA. In-CompleteB. PartialC. CompleteD. Total

39. Age of a student can be calculated from students' date of birth. Age isA. Derived attributeB. Both Stored attribute and Derived attributeC. Stored attributeD. Arrived attribute

40. In the ER modeling of student database talent is indicated by a double lined ellipse. Talent isA. Multivalued attributeB. Weak attributeC. Composite attributeD. Primary attribute

41. Which data model is independent of both the DBMS software and the hardware?A. ConceptualB. ExternalC. AllD. Internal

42. Relationship which relates 2 entities of same entity type is calledA. Ternary RelationshipB. Unary RelationshipC. Recursive RelationshipD. Binary Relationship

43. Which of the following aggregate functions does not ignore nulls in its result?A. COUNTB. MINC. COUNT(*)D. MAX

44. Multi-valued attributes can takeA. Multi entitiesB. Single instance of many entitiesC. Single valueD. Many values

45. Which of the following is true of a network structure?A. It will be the dominant database of the futureB. It is conceptually simpleC. It allows a many-to-many relationshipD. It is a physical representation of the data

46. The data flow model of an application mainly showsA. The underlying data and the relationships among themB. Processing requirements and the flow of dataC. Communication network structureD. Decision and control information.

47. If name can be split into first name and last name then name is ___________ attributeA. SingleB. MultiC. Composite

Page 28: Paper1,2,3

D. Simple

48. If you design table using ER modeling, it will always be ini) 1 NF ii) 2NF iii) 3NF iv) BCNFA. only i & iiiB. Only iC. All of i, ii, iii & ivD. only ii

49. ________ removes transitive dependenciesA. 1 NFB. 2 NFC. BCNFD. 3 NF

50. File system which stores all files at the same levelA. Flat file systemB. Network systemC. Hierarchical systemD. Group file system

51. Concurrency means allowing different transactions to executeA. simultaneouslyB. DifferentlyC. One after otherD. sequentially

52. The employee salary should not be greater than Rs. 2000. This isA. referential constraintB. over-defined constraintC. feasible constraintD. integrity constraint

53. Redundancy is dangerous as it is a potential threat to dataA. IntegrityB. ConsistencyC. SufficiencyD. atomicity

54. Which of the following statement is used to modify a table?A. UPDATETABLEB. ALTER TABLEC. MODIFY TABLED. All

55. Database backup and recovery mechanisms are framed byA. Database AdministratorB. ProgrammerC. Database designerD. End user

56. Which of the following is not the DDL command?A. ALTERB. CREATEC. UPDATED. DROP

57. The one to many relationship existing between 'Parent' & 'Child' entities is aA. tree

Page 29: Paper1,2,3

B. relationshipC. networkD. chain

58. Suppose in a relation we want to make sure that at any point of time all values corresponding to some set of attributes are existing in some other tables. This can be achieved usingA. Time stampingB. XlocksC. Referential integrityD. Tuple integrity

59. Data about data stored in Database is calledA. Raw dataB. Inconsistent dataC. Redundant dataD. Meta data

60. EMPLOYEE table has the following dataEMP_ID EMP_SALARY EMP_COMM------- --------- --------8723 1230 2004357 2390 null9823 2000 1002737 2030 120

What is the result of the following expressionSelect sum (EMP_SALARY)+sum (EMP_COMM) from EMPLOYEEA. 7650B. 8070C. 420D. NULL