You are here:
Home >
DCSA Question and Answer > Computer Programming 151
For DCSA
Office Automation Question and Answer 131
Office Automation Question and Answer 151
Visual Programming Question and Answer
Computer Programming Question and Answer 111
Computer Programming Question and Answer 151
Computer Basic Question and Answer 101
Computer Basic Question and Answer 131
Computer Basic Question and Answer 151
dcsa Microcomputer Troubleshooting Question and Answer 033
dcsa Microcomputer Troubleshooting Question and Answer 043
Microcomputer Troubleshooting Question and Answer 053
Microcomputer Troubleshooting Question and Answer 093
For UPWORK
Computer Skill Quiz and Answer
MS Word Quiz and Answer
MS Excel Quiz and Answer
MS PowerPoint Quiz and Answer
Adobe Photoshop Quiz and Answer
Adobe Illustrator Quiz and Answer
Logo Design Quiz and Answer
|
Diploma in Computer Science and Application Program
151 term (1st Semester) Examination for 2015 Session
Course: Computer Programming (DCSA 1303)
Full marks: 20
Time: 20 Minutes
Objective Type Question
(N.B.- All questions carry equal marks)
Tick the correct answer
Question 1. The ____________ structure involves repeating a sequence until a condition is met
a. loop
b. sequence
c. conditional
d. selection.
Answer :
Question 2. Which format specifier is used to print the values of double type variable?
a. %lf
b. %lu
c. %ld
d. %f.
Answer :
Question 3. Which of the following is not a keyword of C programming language?
a. int
b. register
c. auto
d. function.
Answer :
Question 4. Explicit type conversion is known as
a. conversion
b. separation
c. disjunction
d. casting.
Answer :
Question 5. By default a function returns a value of type
a. int
b. float
c. void
d. char.
Answer :
Question 6. What will be the output?
void main(){
printf("\n %d %d", 10&20, 10/20);}
a. 0 0
b. 20 20
c. 10 10
d. 0 30.
Answer :
Question 7. Which among the following is a unconditional control structure?
a. for
b. do-while
c. if-else
d. goto.
Answer :
Question 8. C language is available forwhich of the following Operating System?
a. Unix
b. DOS
c. Windows
d. All of the above.
Answer :
Question 9. Character constant should be enclosed between-
a. Single quotes
b. Double quotes
c. Both a and b
d. None of these.
Answer :
Question 10. The operator + in a+=4 means
a. a = a + 4
b. a = 4
c. a + 4 = a
d. a = 4 + 4.
Answer :
Question 11. An ampersand (&) before the name of a variable denotes-
a. Actual Value
b. Variable Name
c. Address
d. Data Type.
Answer :
Question 12. The C language consists of _________ number of keywords.
a. 32
b. 40
c. 36
d. 30.
Answer :
Question 13. A static variable by default gets initialized to -
a. 0
b. Blank space
c. 1
d. Garbage value.
Answer :
Question 14. Which of the following are tokens in C?
a. Keywords
b. Constants
c. Identifiers
d. All of the above.
Answer :
Question 15. Recursion is sometimes called -
a. Circular definition
b. Union
c. Complex definition
d. Procedure.
Answer :
Question 16. Which is correct with respect to size of the data type?
a. char > int > float
b. int > char > float
c. char > int > double
d. double > char > int.
Answer :
Question 17. Recursive functions are executed in which order?
a. Parallel order
b. Iterative order
c. Last in first out
d. Random order.
Answer :
Question 18. The C language defines _________ fundamental data type
a. 5
b. 3
c. 6
d. 4.
Answer :
Question 19. do-while loop terminates when conditional expression returns?
a. zero
b. 1
c. -1
d. Non-zero.
Answer :
Question 20. Which keyword can be used for coming out of recursion?
a. break
b. return
c. Both (a) and (b)
d. exit.
Answer :
Question 21. All keyword in C are in-
a. Lower Case letters
b. Upper Case letters
c. Camel Case letters
d. None.
Answer :
Question 22. Which of the following is not a valid C variable name?
a. int number;
b. float rate;
c. int variable_count;
d. int $main;.
Answer :
Question 23. Which of the following declaration is not supported by C?
a. String str;
b. char *str;
c. float str = 3e2;
d. Both (a) and (c).
Answer :
Question 24. Which keyword is used to prevent any changes in the variable within a C program?
a. immutable
b. mutable
c. const
d. volatile.
Answer :
Question 25. The precedence of arithmetic operators from highest to lowest is-
a. %, *, /, +, -
b. %, +, /, *, -
c. +, -, %, *, /
d. %, +, -, *, /.
Answer :
Question 26. Which of the following is not an arithmetic operation?
a. a *= 10;
b. a /= 10;
c. a != 10;
d. a %= 10;.
Answer :
Question 27. Relational operators can be used on:
a. structure
b. long
c. strings
d. float.
Answer :
Question 28. Which of the following is an invalid if-else statement?
a. if (if (a==1)){}
b. if (func1(a)){}
c. if(a){}
d. if((char)a){}.
Answer :
Question 29. Switch statements accepts-
a. int
b. char
c. long
d. All of the above.
Answer :
Question 30. The following code 'for(;;)' represents an infinite loop. It can be terminated by-
a. break
b. exit(0)
c. abort()
d. All of the above.
Answer :
Question 31. The keyword 'break' can not be simply used within:
a. do-while
b. if-else
c. for
d. while.
Answer :
Question 32. Which of the following are correct syntaxes to send an array as a parameter to function?
a. func(&array)
b. func(&&array)
c. func(*array)
d. func(array[size]).
Answer :
Question 33. Which one is correct initialization of an array with all elements as zero?
a. int array[5] = {};
b. int array[5] = {0};
c. int a = 0, b = 0, c = 0;
int array[5] = {a, b,c};
d. All of the mentioned.
Answer :
Question 34. An array of similar data types which themselves are collection of dissimilar datatype:
a. Linked List
b. Tress
c. Array of structure
d. All of the above.
Answer :
Question 35. Which of the following declaration through run time error?
a. int **c = &c;
b. int **c = &*c;
c. int **c = **c;
d. None of the above.
Answer :
Question 36. Which of the following function compares 2 strings with case sensitively?
a. strcmp(s,t)
b. strcmpcase(s,t)
c. strcasecmp(s,t)
d. strchr(s,t).
Answer :
Question 37. In C Programming a function can return-
a. Single value
b. Double vales
c. Many values
d. None of the above.
Answer :
Question 38. In C Programming array index is always start from:
a. 0
b. 1
c. 2
d. 3.
Answer :
Question 39. 'continue' statement is used
a. to go to the next iteration in a loop
b. come out of a loop
c. exit and return to the main function
d. restarts iterations from beginning of loop.
Answer :
Question 40. Identify the wrong statement
a. putchar(65)
b. putchar('x')
c. putchar("x")
d. putchar('\n').
Answer :
|
|