C Programming 2018-objective

Question Paper Details
Tribhuwan University
Faculty of Humanities and Social Sciences
OFFICE OF THE DEAN
2018-objective
Bachelor of Computer Applications
Course Title: C Programming
Code No: CACS151
Semester: Second Semester
Full Marks: 60
Pass Marks: 24
Time: 3 hours
Candidates are required to answers the questions in their own words as far as possible.

Group A

Official Answer
AI Generated Answer

AI is thinking...

Attempt all the questions. [10x1 = 10]

Official Answer
AI Generated Answer

AI is thinking...

1.Which of the following doesn't require an & for the input in scanf()?

a) char name[10];    b) int name[10];    c) float name[10];    d) double name[10];

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2. What is the memory size of float data type in C?

a) 4 Bytes    b) 8 Bytes    c) Depends on the system/complier    d) Cannot be determined.

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. What will be the output of the following C code?

a) 6    b) 8    c) 7    d) 9

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4.Which keyword is used to come out of a loop only for that iteration?

a) break    b) continue    c) return    d) void

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. Bitwise operators can operate upon?

a) Double and chars    b) floats and doubles    c) int and floats    d) int and chars

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6.In C, if you pass an array as an argument to a function, what actually gets passed?

a) Value of elements in an array.   

b) First element in an array.

c) The address of first element in an array.

d) The address of last element in an array.

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7.Which operator is used to access the members of structure using structure variable?

a) Address operator (&)    b) Dot operator (.)    c) Pointer operator (*)    d) Arrow operator (→)

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. Which function is used to record input from file?

a) ftell()    b) fwrite()    c) fprintf()    d) fread()

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9. Which of the following is a keyword used for a storage class?

a) printf    b) goto    c) external    d) break

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. What will be the size of following union declaration?

union test

{

int x;

char y;

float z;

}

a) 8 bytes    b) 13 bytes    c) 1 byte    d) 4 bytes

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...