• Post author:
  • Post category:Computer

Academic Task knows that computer subject becomes necessary for all the students from various branches, and this platform will provide them all the required knowledge to answer the Questions correctly in the various competitive exams and entrance tests. Academictask is trying to make all those Computer Science MCQs topics more simple and easy to understand So that it will help students to learn it very quickly in a limited amount of time like last peak hours of their Extermination, it’s like last time revision Notes. In Computer Science MCQs with answers, sections cover topics like Basic Computer MCQs, C Programming MCQs, Computer Networks, Data Structures, Database Management MCQs, Operating System (UNIX, LINUX, Window), Computer Organizations and Architecture, Data Mining –  and much more. Also, check MCQs on Software Engineering here.

Computer Science and Quiz Test for Preparation

S.NoComputer Science MCQsComputer Science Quiz
1Basic Computer MCQSBasic Computer Quiz

21. The parameter passing mechanism for an array is
A. call by value
B. call by value-result
C. call by reference
D. none of these

22. Consider the statement
int val[2] [4] = { 1, 2, 3, 4, 5, 6, 7, 8} ;
4 will be the value of
A. val[0 ][ 3]
B. val[0][4]
C. val[1][1]
D. none of the above

23. The maximum number of dimension an array can have in C is
A. 3
B. 4
C. 5
D. compiler dependent

24. Under which of the following conditions, the size of an one-dimensional array need not be specified?
A. when initialization is a part of definition
B. when it is a declaration
C. when it is a formal parameter and an actual argument
D. All of the above

25. If a two dimensional array is used as a formal parameter, then
A. both the subscripts may be left empty
B. the first (row) subscript may be left empty
C. the first subscript must be left empty
D. both the subscripts must be left empty

26. The following program
main(){ static char a[3][4] = {“abcd”, “mnop”, “fghi”}; putchar(**a);}
A. will not compile successfully
B. results in run-time error
C. prints garbage
D. none of the above

*a points to the string “abcd”.**a is the first character of “abcd”, which is the character ‘a ‘

27. C does no automatic array bound checking. This is
A. true
B. false
C. C’s asset
D. C’s shortcoming

Explanation :
C does no array bound checking. Because of this, one can access fifth clement of an array that is declared to he of lesser size.

28. If n has the value 3, then the statement
a [++n] = n++ ;
A. assigns 3 to a [5]
B. assigns 4 to a [5]
C. assigns 4 to a [4]
D. what is assigned is compiler-dependent

29. Choose the statement that best defines an array
A. It is a collection of items that share a common name
B. It is a collection of items that share a common name and occupy consecutive memory location
C. It is a collection of items of the same type and storage class that share a common name and occupy consecutive memory locations
D. None of the above

30. Choose the correct statements
A. Strictly speaking C supports 1-dimensional arrays only
B. An array element may be an array by itself
C. Array elements need not occupy contiguous memory locations
D. Both (a) and (b)

C supports 1-dimensional arrays only. But, the array element can be an array by itself. Using this, one can simulate multi-dimensional arrays. Though at the user level, we use 2-dimensional arrays, the compiler interprets this as a 1-dimensional array, each of whose element is a 1-dimensional array. As a matter of fact, a declaration like char [3] [4] , will be interpreted as a 1-dimensional array of size 3 (rather than 4)—each element being a character array of length 4.