Vous êtes sur la page 1sur 2

Dr. K.V. SUBBA REDDY COLLEGE OF ENGINEERING FOR WOMEN OPP. DUPADU RAILWAY STATION, N.H-7, KURNOOL.

I B Tech II-MID Examinations FEB 2012 SUB: PCDS Branch: CSE Time : 90 Minutes Max.Marks:30
Note: Answer ANY THREE of the following. All Questions carry equal Marks
1. 2. 3. 4. 5.

a)What is an array,how an array is initialized,give an example? b)what is a storage class,Explain the different types of storage class? a)What is a recursive function,write a program to calculate factorial of a given number using recursive function? b)Write a recursive program of Towers of honoi problem? Explain the different types of arrays,Write a program for displaying a 3x3 matrix using 2D arrays? a)What is a pointer,how is a pointer declared,give an example? b)Write a program to display array elements with their address using array name as a pointer? a)Explain the Stricmp() function,write a c program to compare two strings using stricmp() b)Explain the different types of functions?

Dr. K.V. SUBBA REDDY COLLEGE OF ENGINEERING FOR WOMEN OPP. DUPADU RAILWAY STATION, N.H-7, KURNOOL. I B Tech II-MID Examinations FEB 2012 SUB: PCDS Branch: CSE Time : 90 Minutes Max.Marks:30
Note: Answer ANY THREE of the following. All Questions carry equal Marks
1. 2. 3. 4. 5.

a)What is an array,how an array is initialized,give an example? b)what is a storage class,Explain the different types of storage class? a)What is a recursive function,write a program to calculate factorial of a given number using recursive function? b)Write a recursive program of Towers of honoi problem? Explain the different types of arrays,Write a program for displaying a 3x3 matrix using 2D arrays? a)What is a pointer,how is a pointer declared,give an example? b)Write a program to display array elements with their address using array name as a pointer? a)Explain the Stricmp() function,write a c program to compare two strings using stricmp() b)Explain the different types of functions?

Dr. K.V. SUBBA REDDY COLLEGE OF ENGINEERING FOR WOMEN OPP. DUPADU RAILWAY STATION, N.H-7, KURNOOL. I B Tech II-Quiz Examinations FEB 2012 SUB: PCDS Branch: CSE Name: H.T.No: Time : 20 Minutes Signature of the invigilator:
1

Max.Marks:20

2. 3. 4. 5. 6. 7.

8. 9. 10. 11. 12. 13. 14. 15.

Array elements are stored in a)scattered memory locations b) parallel memory locations c)dual memory locations d)sequential memory locations The string always ends with a)10\character b)\character c)\n character d)\0 character Which is the correct way to declare a pointer a) int ptr* b)int-ptr x; c)*int ptr d)int*ptr The variables that are defined outside the main are called a) local variables b)pointer variables c)function variables d)global variables The function proto type declaration stament always terminated with a)null character b)full stop c)question mark d)semicolon Exit from the called function to the calling function is done by a)main b)void main c)return d)pointer When return statement is executed it always returens a)0 b)2 c)1 d)3 The direct recursion function calls itself till the condition is a) Executed b)false c) true d) none The scope of the variable depends on its a)array b)function c) storage class d)public class A variable declared inside the function without storage class name by default is a)external variables b)static variables c)auto variables d)register variables
The variable that are available to all the function are called a)auto variables b)external variables c)static variables d)register variables A preprocessor directive begins with a)* b)# c)? d)\n A structure contains a)same data types b)different data types c)only int data types d)only character data types When ever a structure element is to be passed to any other function it is essential to declare the structure a)inside the main b)out side the main c)any where d)none

[ [ [ [ [ [ [ ] ] ] ] ] ]

[ [ [ [ [ [ [ [ [

] ] ] ] ] ] ] ] ]

16. 17. 18. 19. 20.

The------function copies the contents of one string to another a)strcopy ( ) b)strcpy( ) c)stricpy( ) d) stcpy( ) The format of the strncpy a)strncpy(destination, source, n) b)strcpy(destination, source) c)both a&b d)none All the elements of an array share the a)same name b)different name c)invidual name d)all above The null character acts as -------of the character array a)end b)start c)new line d)all above The--------are used for matrix representation of elements a).array b)pointer c)structure d)function The--------is a memory variable that stores a memory address a)pointer b)array c)function d)stucture ALL THE BEST

Vous aimerez peut-être aussi