Sei sulla pagina 1di 7

Model Paper

BCA 103: Problem Solving through C Programming


By: Mangalesh Vyas

Section A
1. Which of the following special symbol allowed in a variable name? A. *(asterisk) C. (hyphen) B. ?(question mark) D. _(underscore)

2.

In C language Step by Step procedure to solving a given problem is known as : A. C. Program Flowchart B. Algorithm D. None of these

3.

In C language Pictorial representation of a given problem is known as: A. Program C. Flowchart B. Algorithm D. None of these

4. Statement missing in a printf() cause a error of : A. Syntax error C. Runtime error B. Logic error D. No error

5. Errors occur during the execution of a program is known as: A. Syntax error C. Runtime error B. Logic error D. No error

6. Which escape sequence character causes the cursor to move in the next line on the screen? A. \t C. \n B. \new D. \d

7. What is the range of integer(int) data type in C A. -32268 to 32267 B. -32768 to 32767

C. -128 to 127

D. 0 to 65535

8. What are the different types of real data type in C ? A float, double C. float, double, long double B. short int, double, long int D. double, long int, float

9. Which of the following are tokens in C? A. Keywords C. Constants 10. C is a ___ language: A. High Level C. Middle Level B. Low Level D. Machine Level B. Variables D. All of the above

11. Which symbol is used as a statement terminator in C ? A. ! C. ; B. # D. ~

12. The operator && is an example for ___ operator. A. Assignment C. Logical B. Increment D. Rational

13. Which of the following operator has the highest precedence in C ? A. == C. => B. * D. +

14. Which of the following is a ternary operator in C ? A. ! C. ? B. && D. ++

15. Symbolic constants can be defined using A. const C. #typedef B. #define D. #include

16. clrscr() function used in C is available in which header file? A. stdio.h C. math.h B. conio.h D. stdlib.h

17. continue statement is used

A. to go to the next iteration in a loop C. exit and return to the main function

B. come out of a loop D. restarts iterations from beginning of loop

18. If the size of the array is less than the number of initializers then, A Extra values are being ignored C Size of Array is increased B. Generates an error message D. Size is neglected

19. If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable? A. '.' C. '*' 20. A pointer is A. A keyword used to create variables B. A variable that stores address of an instruction C. A variable that stores address of other variable D. All of the above 21.The operator used to get value at address stored in a pointer variable is A. * C. && B. & D. -> B. '&' D. '->'

22. The keyword used to transfer control from a function back to the calling function is A. switch C. go back B. goto D. return

23. Which of the following are correct preprocessor directives in C? A. #ifdef C. #elif B. #if D. All of the above

24. What does the following declaration mean? int (*ptr)[10] A. ptr is array of pointers to 10 integers B. ptr is a pointer to an array of 10 integers C. ptr is an array of 10 integers D. ptr is an pointer to array 25. What is the similarity between a structure, union and enumeration?

A. All of them let you define new values B. All of them let you define new data types C. All of them let you define new pointers D. All of them let you define new structures

26. Declare the following statement? "An array of three pointers to chars". A. char *ptr[3](); C. char **ptr[3]; B. char *ptr[3]; D. char *ptr(3);

27. Which of the following function is more appropriate for reading in a multi-word string? A. printf(); C. gets(); B. scanf(); D. puts();

28. The statement which executed in a Switch statement causes immediate exit from the structure? A. case C. continue B. break D. default

29. Which is the entry control loop in C? A. while C. for B. do-while D. while and for

30. Which loop is always executed at least once in C ? A. while C. for B. do-while D. All of the above

31. The process of arranging the elements of an array in order is: A. Debugging C. Sorting B. Searching D. Testing

32. An array created at the runtime is referred to as A. Runtime array C. multidimensional array B. Dynamic array D. Array

33. The library function which counts and returns the number of character in a string: A. strcat() C. strcmp() B. strlen() D. strderr()

34. In C when a function calls itself its known as: A. argument B. recursion

C. function call D. Repeat 35. By default C function returns type is: A. void B. float C. char D. int

36. Which one is the not a storage class in C? A. Register C. Static B. External D. Constant

37. A mechanism for packing data of different type is known as: A. Register C. Structure B. Array D. Variables

38. Which operator is used to access the members of structure variable ? A. % (Modulus) C. && (Logical AND) B. . (dot operator) D. , (comma operator)

39. Which file function is used to Reads a Character from a file: A. readc() C. getf() B. putc() D. getc()

40. Which function can be used to test for an end of file condition : A. eof() C. ferror() B. feof() D. fseek()

41. Which of the following is not a unary operators in C? A. ! (Logical Not) C. && (Logical AND) B. sizeof D. ++(increment)

42. Statements use in c to branch unconditionally from one point to another in program is known as: A. break C. goto B. continue D. switch

43. Which statement is use to jumping out of a loop in a C program? A. break C. goto B. continue D. switch

44. Which feature of C language provides the Modular programming?

A. Array C. function

B. Structure D. pointer

45. Which header file is included when mathematical functions are used in a program? A. stdio.h B. conio.h C.math.h D. None of the above

Section B
1. What is algorithm and flowchart. Explain both in detail with example. Also describe the advantage of algorithm. 2. C has a rich set of operator? Continue this statement with explaining different types of operator in c with example. 3. What is modular programming. What is difference between call by value and call by refrence.Explain with example. 4. What is Recursion. Write a program in c which describe the significance of Recursion. 5.Explain the following with example: A. Array and Structure B. Control Flow Statements C. Pointers.

Potrebbero piacerti anche