C Programming and Problem Solving
Questions 321 to 330
Which of the following is “token-pasting” operator.
(a) $$ (b) @ (c) ## (d) && (e) @@.
|
|
Describe the following array
int s[5][6]
(a) s is a two
–dimensional 30 element array(6 rows,5 columns)
(b) s is a two –dimensional 30 element array(5
rows,6 columns)
(c) s is a one –dimensional 30 element array(5
rows,6 columns)
(d) s is a two –dimensional 30 element array(5
rows,5 columns)
(e) s is a one dimensional 30 element array (6
rows,5 columns).
|
|
A linker combines (_____________) and (_____________) so
that they can be executed as a unit.
(a) Object files, library files (b) Source files, target files
(c) Object files, executable files (d) Target files, library files
(e) Source files, text files.
|
|
Preprocessot directive, (___________), instructs the
preprocessor to copy the contents of the specified file into the program.
(a) #insert (b) #include (c) #copy (d) #define (e) #swap.
|
|
Which of the following returns multiple values?
(a) printf() (b)
scanf() (c) printf&scanf() (d) getch() (e) clrscreen().
|
|
What is the output of the following statements?
For(i=10;i++;i<15)
Printf(“%d”,i);
(a) 1011121314 (b) 101112131415 (c) 91011121314
(d) 101112131415 (e) no output.
|
|
What number would be shown on the screen after the
following statements of c are executed?
Char ch;int i;ch=’g’;i=ch-‘a’;
Printf(“%d”,i);
(a) 6 (b) 7 (c) 8 (d) 9 (e) 5.
|
|
The size of an int must be greater than or equal to that
of a
(a) long
int (b) short int (c) float (d) double (e) char.
|
|
What is the output of the following statements?
Int b=5,c=15,d=8,e=8,a;
A=b>c?c>d?12:d>e?13:14:15;
Printf(“%d”,a);
(a) 13 (b) 14 (c) 15 (d) 16 (e) garbage value.
|
|
A declaration float a, b; occupies ___ of memory
(a) 1
byte (b) 4 bytes (c) 8 bytes (d) 16 bytes (e) 2 bytes.
|
Answers
Answer : (c)
Reason : Remaining
all are irrelevant
|
|
Answer : (b)
Reason : two
dimension array is indicated with two square brackets first bracket value
indicate number of rows and second
bracket indicate column value
|
|
Answer : (b)
Reason : Remaining
all are contradictory to the functionality of linker.
|
|
Answer : (b)
Reason : #insert,#copy,#swap
are irrelevant.#define is for symbolic constants.
|
|
Answer : (b)
Reason : Remaining
all donot match with the question.as they return single value.
|
|
Answer : (e)
Reason : Just i value
is assigned 0 and comes out of the loop.
|
|
Answer : (a)
Reason : The
difference of ascii values is 6.
|
|
Answer : (b)
Reason : long int
,float,double are greater than int.char cant be because comparision is made
between numeric data types.
|
|
Answer : (c)
Reason : in the order
of evaluation of conditional operator the final result is 15.
|
|
Answer : (c)
Reason : float data
type occupies 4 bytes. So totally a, b occupies 8 bytes.
|
thank you.
ReplyDeletec++ tutorial
java tutorial