Вы находитесь на странице: 1из 4

Subject- C Programming

Section - A
Tick the Correct Answer from the option given
1. How many times below for loop will be executed ?
#include<stdio.h>
int main()
{
int i=0;
for(;;)
printf("%d",i);
return 0;
}
A) 0 times
B) Infinite times
C) 1 times
D) 10 times

2. Set of consecutive memory locations is called as ________.


A) Function
B) Loop
C) Array
D) Pointer

3. Array can be considered as set of elements stored in consecutive memory locations but having
__________.
A) Different Data Type
B) None of these
C) Same Data Type
D) Same Scope

4. If we have declared an array described below -


int arr[6];
then which of the following array element is considered as last array element ?
A) arr[6]
B ) arr[5]
C) arr[0]
D) arr[4]

5. Break statement is used for


A) Quit a program
B) Quit the current iteration
C) Both of above
D) None of above

6. Total number of keywords in C are


A) 30
B) 32
C) 48
D) 132

7.
How many times the while loop will get executed if a short int is 2 byte wide?
#include<stdio.h>
int main()
{
int j=1;
while(j <= 255)
{
printf("%c %d\n", j, j);
j++;
}
return 0;
}
A) Infinite times
B) 255 times
C) 256 times
D) 254 times

8. Which of the following is not logical operator?


A) &
B) &&
C) ||
D) !

9. In mathematics and computer programming, which is the correct order of mathematical operators ?
A) Addition, Subtraction, Multiplication, Division
B) Division, Multiplication, Addition, Subtraction
C) Multiplication, Addition, Division, Subtraction
D) Addition, Division, Modulus, Subtraction

10. Which of the following cannot be checked in a switch-case statement?


A) Character
B) Integer
C) Float
D) enum

Fill in the Blanks with Correct Answer.


11. The C language was originally developed from------------language.
12. A C program is basically a collection of-----------.
13. C program execution begins from------------ function.
14. The relational expression -30>=0 is------------.
15. The operator “--’’ is known as ------------ operator.
16. The a++ Is equivalent to ------------.
17. The standard mathematical functions are included in the ------------..header file.
18. Repeating a set of statements for a specific number of times is called ------------ structure.
19. The ------------ statement causes the next iteration of the loop structure.
20. Consider the following statements:
a=10;
b=a++;
then the value of b is ----------------
State the given Statement is True/False.
21. In C, upper and lower cases letter are same.
22. C keywords can be used as variable names.
23. A # define is a compiler directive and not a statement.
24. # define lines should end with a semicolon.
25. stdio.h refers to standard l/o header file.
26. stdio.h contains mathematical functions.
27. Every C program must have at least one main ( ) function section.
28. Every C program ends with an END word.
29. A printf ( ) function generate only one line of output.
30. The basic meaning of the C keywords can be changed.

Write Short Notes on (Any Two)


31. Increment decrement and Bitwise Operators
32. if-else statement.
33. Recursion.

Answer with one Sentence


34. What is the meaning of base address of the array?
35. S++ or S = S+1, which can be recommended to increment the value by 1 and why?
36. What is the difference between actual and formal parameters?
37. What is a token?
38. Explain the use of %i format specifier w.r.t scanf().
39. Does a break is required by default case in switch statement?
40. When to user -> (arrow) operator.
41. What are command line arguments?
42. Describe the file opening mode “w+”.
43. Define an array.

Match the Columns


1. size of float data type. A. Identifier
2. Elements of structure are B. 4 byte
3. while is a kind of loop C. entry control
4. for is a kind of loop D. conio.h
5. clrscr function is defined in E. 0
6. fprintf and fscanf functions are build in F. pointer
7. default value of extern variable is G. Exit Control
8. macros are H. stdio.h
9. Arrow -> operator is used in I. different
10. name of function, structure etc. known as J. Pre- processor

Label the Following Diagram


1. Draw a flow chart to calculate simple interest numbers.

Define following Terms (Any Five)


1. Do-While Statement.
2. 1D Array.
3. Union.
4. Structure
5. Conditional Operator
6. Pointers

Section – B

Differentiate the following Terms (Any Three)


1. Structure and Union.
2. Array and structure
3. Do-while and While.
4. (&) and (&&) operator.

Answer the Following (Any Two).

1. Write a C Program to print.


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
2. Write a program to find the sum of elements in an array.
3. Write a C Program to check number is even or odd.

Define (Any One)


1. Explain file operations in detail.
2. Explain Call by value and Call by Reference in detail.

Вам также может понравиться