SECTION A
MCQS
This section deals with mcqs from tools like codeblocks, Matlab, wampserver, etc
1. Which of the following operator takes only integer operands?
A. +
B. *
C. /
D. %
E. None of these
2. In C programming language, which of the following type of operators have the highest
precedence
A. Relational operators
B. Equality operators
C. Logical operators
D. Arithmetic operators
3. What will be the output of the following program?
void main()
{
int a, b, c, d;
a = 3;
b = 5;
1
c = a, b;
d = (a, b);
printf("c=%d d=%d", c, d);
}
A. c=3 d=3
B. c=3 d=5
C. c=5 d=3
D. c=5 d=5
A. An Editor
B. A compiler
C. An operating system
D. None of these.
5. A C variable cannot start with
A. A number
D. An alphabet
6. What will be printed after execution of the following program code?
main()
{
printf("\\nab");
printf("\\bsi");
printf("\\rha");
}
A. absiha
2
B. asiha
C. haasi
D. hai
E. None of these
A. start()
B. system()
C. main()
D. printf()
E. getch()
8. What will be the output of the given program?
#include<stdio.h>
void main()
{
int i=10;
printf("i=%d", i);
{
int i=20;
printf("i=%d", i);
i++;
printf("i=%d", i);
}
printf("i=%d", i);
}
A. 10 10 11 11
B. 10 20 21 21
3
C. 10 20 21 10
D. 10 20 21 20
{
int i;
printf("Enter a number:");
scanf("%d", &i); // 99 is given as input.
if(i%5 == 0){
printf("nNumber entered is divisible by 5");
}
}
A. Enter a number:99
C. complier error
C. int n{6} = { 2, 4, 12 };
A. 1
B. 0
C. 10
D. 6
E. None of these
12. Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
A. 1
B. 1, 4
C. 2, 3
D. 2, 4
E. None of these
13. What is function?
C. Function is a block of code that performs a specific task. It has a name and it is reusable.
A. call by value
5
B. call by reference
D. None of these.
15. Which of the following is a complete function?
A. int funct();
E. None of these
16. What is the full form of SQL?
D. None of these
17. In SQL, which command(s) is(are) used to change a table's storage characteristics?
A. ALTER TABLE
B. MODIFY TABLE
C. CHANGE TABLE
A. Insert
B. Modify
C. Look-up
6
A. SELECT Username AND Password FROM Users
D. None of these
20. The FROM SQL clause is used to...
D. None of these
21. Which of the following SQL commands is used to retrieve data?
A. DELETE
B. INSERT
C. SELECT
D. JOIN
22. Which SQL statement is used to update data in a database?
A. SAVE
B. UPDATE
C. SAVE AS
D. MODIFY
23. What does Matlab stand for?
a) Math Laboratory
b) Matrix Laboratory
c) Mathworks
d) Nothing
e) none of the above
26. This Matlab command clears all data and variables stored in memory:
a) clc
b) clear
c) delete
d) deallocate
e) none of the above
27. To print a newline in a fprintf statement, you must use the following escape character:
a) \t
b) \nl
c) \nxt
d) \n
e) none of the above
28. In Matlab, this keyword immediately moves to the next iteration of the loop:
a) update
b) goto
c) continue
d) break
e) none of the above
29. Which of these is the way to access the first element in a vector named v (assuming there is
atleast one element in the vector)?
a) v(0)
b) v(1)
c) v
d) v(: , 0)
e) none of the above
30. Which of the following is used to see if two elements are equal in MATLAB?
a) !=
b) ==
c) isequal
d) =
e) none of the above
8
SECTION B
PART 1: STRUCTURAL
1 Outline two (2) good programming practice that makes a code a code.
2 what does the statement #include <stdio.h> means?
3 list the three control structure used in C programming
4 how can functions be called in c programming?
5 The statement int array [4][3] is the definition of an array. Whats the meaning of [4][3]?
6 How many memory banks does the microcontroller PIC16F84A has as used in proteus and list
the function of each bank
8 list the most common registers that are found on bank 0 and list their function
9 To switch between segments of codes in Assembly language programming what is the
command used?
10 what is the command use to see the number of databases, to enter a particular database
(database name is user), to delete an entire database.
11 In batch programming, what command is used to print information on the screen?
12 In excel, 5 6 how will you add 5 to 6 automatically given that 5 is on E3 and 6
is on E4?
9
Carry (C) = A AND B.
Write a VHDL code for the above illustration.
10