C Programming and Problem Solving Questions and Answers 331 to 340

C Programming and Problem Solving

Questions 331 to 340


331.
C was designed by
(a)
Dennis Ritchie in 1972
(b)
Ron  rivest in 1970
(c)
Dennis Ritchie in 1970
(d)
Stroustrup in 1980
(e)
Stroustrup in 1975.
332.
Determine which of the following is not valid variable
(a)
Sample
(b)
_sample
(c)
Sample123
(d)
__sample
(e)
1sample.
333.
How much memory allocated for long long int?
(a)
4
(b)
8
(c)
2
(d)
6
(e)
1.
334.
Find the output of the following program
int main()
{
int i=5,j;
j=!i;
Printf(“%d”,j);
}
(a)
0
(b)
1
(c)
5
(d)
Compilation  error
(e)
Warning.
335.
Find the output of the following program
int mian()
{
int a=10,b=20,c=30;
a=b==c;
printf(“%d%d%d”,a,b,c);
}
(a)
10,20,30
(b)
20,30,10
(c)
10,20,0
(d)
10,20,1
(e)
0,20,30.
336.
Find the output of the following program
int main()
{
int a=10;
printf(“%d%d%d%d”,a++,++a,a+1,++a);
}
(a)
10,12,12,11
(b)
11,11,12,12
(c)
12,12,12,11
(d)
10,11,12,13
(e)
10,12,12,12.
337.
Compound statement is enclosed within which of the following the following characters?
(a)
“”
(b)
{}
(c)
[]
(d)
()
(e)
‘’.
338.
Find the output of the following program
int main()
{
float f1=10.3;
printf(“%f”,f1);
}
(a)
10.3
(b)
10.300
(c)
10.301
(d)
10
(e)
10.300000.
339.
Find the output of the following program
int main()
{
int x=5;
x=++x;
printf(“%d”,x);
}
(a)
0
(b)
1
(c)
5
(d)
6
(e)
4.
340.
What is the value of the ‘a’ in the expression:  a = (b=10, b*b);?
(a)
Syntax error
(b)
Run time error
(c)
100
(d)
10
(e)
0.

Answers



331.
Answer : (a)
Reason  :       C was developed by Dennis Ritche in 1972.
332.
Answer : (e)
Reason  :       All the variables start with alphabetic or _(underscore).
333.
Answer : (b)
Reason  :       size of long long int is 8.
334.
Answer : (a)
Reason  :       !5 value is 0(false).
335.
Answer : (e)
Reason  :       output of a=b==c is 0
336.
Answer : (c)
Reason  :       In printf values are printed from right to left
337.
Answer : (b)
Reason  :       Compound statements enclosed in {}
338.
Answer : (e)
Reason  :       default precision value of float is 6
339.
Answer : (d)
Reason  :       ++x is pre increment
340.
Answer : (c)
Reason  :       output of b*b is stored into a.


<< Prev 1...  2...  3...  4...  5...  6...  7...  8...  9...  10...  11... 12...  13...  14...  15...  16...  17...  18...  19...  20...  21...  22...  23...  24...  25...  26...  27...  28...  29...  30...  31...  32...  33...  34...  35...  36...  Next >>


No comments :

What you think about these Questions and Answers ? Let me know in comments.

Post a Comment