Sample C Programming Questions & Answers:
1. Comment on the output of following code:
a) It will print a
b) It will print 0
c) Compile time error
d) Run time error
View Answer
b) It will print 0
c) Compile time error
d) Run time error
View Answer
Answer:d
Output:
$ cc pgm.c
$ a.out
Segmentation fault (core dumped)
Output:
$ cc pgm.c
$ a.out
Segmentation fault (core dumped)
2. What is the output of this C code?
a) True
b) False
View Answer
b) False
View Answer
Answer:b
Output:
$ cc pgm.c
$ a.out
False
Output:
$ cc pgm.c
$ a.out
False
3. What is the output of this C code?
a) abnfoundry C-Test
b) Sanfoundry C-Test
c) Compile time error
d) Run time error
View Answer
b) Sanfoundry C-Test
c) Compile time error
d) Run time error
View Answer
Answer:d
Output:
$ cc pgm.c
$ a.out
Segmentation fault (core dumped)
Output:
$ cc pgm.c
$ a.out
Segmentation fault (core dumped)
4. What is the output of this C code?
a) True
b) False
View Answer
b) False
View Answer
Answer:a
Output:
$ cc pgm.c
$ a.out
False
Output:
$ cc pgm.c
$ a.out
False
5. What is the output of this C code?
a) True
b) False
c) No Output will be printed
d) Run Time Error
View Answer
b) False
c) No Output will be printed
d) Run Time Error
View Answer
Answer:c
Output:
$ cc pgm.c
$ a.out
$
Output:
$ cc pgm.c
$ a.out
$
1. Pipelining strategy is called implement
|
instruction execution |
instruction prefetch |
instruction decoding |
instruction manipulation |
ANSWER : instruction prefetch
|
2. In MS-DOS you can use small or capital letter of combination of both to enter a command but internally MS-DOS work with.
|
Small letter |
Capital letter |
Both a and b |
None of above |
ANSWER : Capital letter
|
3. Terminals are required for
|
eal-time, batch processing & time-sharing |
eal time, time-sharing & distributed message processing |
eal time, distributed processing & manager inquiry |
eal-time, time sharing & message switching |
ANSWER : real-time, time sharing & message switching
|
4. To copy the file command.com from drive c: to drive a:
|
Drive c: copy drive a:\command.com |
C:A: copy command.com |
Copy c:\command.com a: |
Both b and c |
ANSWER : Copy c:\command.com a:
|
5. Electronic spreadsheets are most useful in a situation where relatively .... data must be input but ...... calculations are requied.
|
little; simple |
large; simple |
large; complex |
little; complex |
ANSWER : little; complex
|
6. A collection of 8 bits is called
|
byte |
word |
record |
All of above |
ANSWER : byte
|
7. Which of the following is not one of the process that a high level language program msut go through before it is ready to be executed?
|
translation |
controlling |
lading |
linking |
ANSWER : translation
|
8. While working with Ms-Dos which command transfers a specific file from one disk to another?
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diskcopy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rename | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ANSWER : Copy
|
No comments:
Post a Comment