79
79.8k

100+ Programming for Problem Solving Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) .

1.

Which Of The Following Are Components Of Central Processing Unit (CPU)?

A. Arithmetic Logic Unit, Mouse
B. Arithmetic Logic Unit, Control Unit
C. Arithmetic Logic Unit, Integrated Circuits
D. Control Unit, Monitor
Answer» B. Arithmetic Logic Unit, Control Unit
2.

In Which Of The Following Form, Data Is Stored In Computer?

A. Decimal
B. Binary
C. Hexadecimal
D. Octal
Answer» B. Binary
3.

Which Level Language Is Assembly Language?

A. High-Level Programming Language
B. Medium-Level Programming Language
C. Low-Level Programming Language
D. Machine Language
Answer» C. Low-Level Programming Language
4.

1 Mega Byte Is Equal To

A. 1024 Bytes
B. 1024 Kilo Bytes
C. 1024 Giga Bits
D. 1024 Bits
Answer» B. 1024 Kilo Bytes
5.

One Byte Is Equal To How Many Bits ?

A. 4 Bits
B. 8 Bits
C. 12 Bits
D. 16 Bits
Answer» B. 8 Bits
6.

One Nibble Is Equal To How Many Bits ?

A. 4 Bits
B. 8 Bits
C. 12 Bits
D. 16 Bits
Answer» A. 4 Bits
7.

An Assembler Is Used To Translate A Program Written In ?

A. Low-Level Language
B. Machine Language
C. Assembly Language
D. High-Level Language
Answer» C. Assembly Language
8.

We Can Insert Pre Written Code In A C Program By Using

A. #Read
B. #Get
C. #Include
D. #Put
Answer» C. #Include
9.

Ritchie And Brian Kernighan Jointly Carried Out The Development Of C And That Version Is ________ .

A. ISO C
B. K&R C
C. ANSI C
D. R&K C
Answer» B. K&R C
10.

Who Was Creator Of B Language, Which Inspired Dennis Ritchie To Create Strong Procedural Language Called C?

A. Thomas E. Kurtz
B. James Gosling
C. Brian Kernighan
D. Ken Thompson
Answer» D. Ken Thompson
11.

Which Committee Standardize C Programming Language?

A. W3C
B. ANSI
C. ISO
D. TRAI
Answer» B. ANSI
12.

Dennis Was Author Of Famous Programming Book _________ .

A. Thinking In C
B. C Programming For Scientist
C. The C Programming Language
D. C Programming And Techniques
Answer» C. The C Programming Language
13.

Many Features Of C Were Derived From An Earlier Language Called _____.

A. PASCAL
B. BASIC
C. FORTRAN
D. B
Answer» D. B
14.

C Programming Was Created At ______ By Dennis Ritchie.

A. AT&T Bell Laboratory
B. Stanford Lab
C. MIT University
D. Haward University
Answer» A. AT&T Bell Laboratory
15.

Which Type Of Software Is An Operating System?

A. Utility Software
B. System Software
C. Application Software
D. Firmware Software
Answer» B. System Software
16.

Microsoft Office Is Type Of?

A. Utility Software
B. System Software
C. Application Software
D. Firmware Software
Answer» C. Application Software
17.

How Many Main() Function We Can Have In Our Project?

A. 1
B. 2
C. No Limit
D. Depends On Compiler
Answer» A. 1
18.

Is It Possible To Run Program Without Main() Function?

A. Yes
B. No
C. Option.
D. Option.
Answer» A. Yes
19.

What Is Sizeof() In C?

A. Operator
B. Function
C. Macro
D. None Of These
Answer» A. Operator
20.

Bitwise Operators Can Operate Upon?

A. Double And Chars
B. Floats And Doubles
C. Int And Floats
D. Int And Chars
Answer» D. Int And Chars
21.

What Is C Tokens?

A. The Smallest Individual Units Of C Program
B. The Basic Element Recognized By The Compiler
C. The Largest Individual Units Of Program
D. A & B Both
Answer» D. A & B Both
22.

What Is Keywords?

A. Keywords Have Some Predefine Meanings And These Meanings Can Be Changed.
B. Keywords Have Some Unknown Meanings And These Meanings Cannot Be Changed.
C. Keywords Have Some Predefine Meanings And These Meanings Cannot Be Changed.
D. None Of The Above
Answer» C. Keywords Have Some Predefine Meanings And These Meanings Cannot Be Changed.
23.

What Is Constant? A Constants Have Fixed Values That Do Not Change During The Execution Of

A. Program
B. Constants Have Fixed Values That Change During The Execution Of A Program
C. Constants Have Unknown Values That May Be Change During The Execution Of A Program
D. Option.
Answer» A. Program
24.

Which Is The Right Way To Declare Constant In C?

A. Int Constant Var =10;
B. Int Const Var = 10;
C. Const Int Var = 10;
D. B & C Both
Answer» D. B & C Both
25.

Which Operators Are Known As Ternary Operator?

A. ::, ?.
B. ?, :
C. ?, ;;
D. None Of The Above
Answer» B. ?, :
26.

Total Number Of Keywords In C Are

A. 30
B. 12
C. 34
D. 32
Answer» D. 32
27.

The Compiler In C Ignores All Text Till The End Of Line Using

A. //
B. /
C. */
D. /*/
Answer» A. //
28.

Printf() Belongs To Which Library Of C

A. Stdlib.H
B. Stdio.H
C. Stdout.H
D. Stdoutput.H
Answer» B. Stdio.H
29.

What Is Correct Order Of Precedence In C

A. Addition, Division, Modulus
B. Addition, Modulus, Division
C. Multiplication, Substration, Modulus
D. Modulus, Multiplication, Substration
Answer» D. Modulus, Multiplication, Substration
30.

In Switch Statement, Each Case Instance Value Must Be _______?

A. Constant
B. Variable
C. Special Symbol
D. None Of The Above
Answer» A. Constant
31.

What Is The Work Of Break Keyword?

A. Halt Execution Of Program
B. Restart Execution Of Program
C. Exit From Loop Or Switch Statement
D. all
Answer» C. Exit From Loop Or Switch Statement
32.

Which One Of The Following Sentences Is True ?

A. The Body Of A While Loop Is Executed At Least Once.
B. The Body Of A Do ... While Loop Is Executed At Least Once.
C. The Body Of A Do ... While Loop Is Executed Zero Or More Times.
D. A For Loop Can Never Be Used In Place Of A While Loop.
Answer» B. The Body Of A Do ... While Loop Is Executed At Least Once.
33.

A C Variable Cannot Start With

A. An Alphabet
B. A Number
C. A Special Symbol Other Than Underscore
D. Both (B) And (C)
Answer» D. Both (B) And (C)
34.

Which Of The Following Shows The Correct Hierarchy Of Arithmetic Operations In C

A. / + * -
B. * - / +
C. + - / *
D. * / + -
Answer» D. * / + -
35.

Int Main()
{
Extern Int I;
I = 20;
Printf("%D", Sizeof(I));
Return 0;
}

A. 20
B. 0
C. Undefined Reference To I
D. Linking Error
Answer» C. Undefined Reference To I
36.

Is The Following Statement A Declaration Or Definition Extern Int I;

A. Declaration
B. Definition
C. none
D. all
Answer» A. Declaration
37.

Int Main()
{
Int X = 10;
{
Int X = 0;
Printf("%D",X);
}
Return 0;
}

A. 10
B. Compilation Error
C. '0'
D. Undefined
Answer» C. '0'
38.

//This Program Is Compiled On 32 Bit DEV-C++
Int Main()
{
Char *Ptr1, *Ptr2;
Printf("%D %D", Sizeof(Ptr1), Sizeof(Ptr2));
Return 0;
}

A. 1 1
B. 2 2
C. 4 4
D. none
Answer» C. 4 4
39.

What Should Be The Output:
Int Main()
{
Int A = 10/3;
Printf("%D",A);
Return 0;
}

A. 3.33
B. 3.0
C. 3
D. Option.
Answer» C. 3
40.

Which Of The Following Is Executed By Preprocess?

A. #Include<Stdio.H>
B. Return 0
C. Void Main(Int Argc , Char ** Argv)
D. none
Answer» A. #Include<Stdio.H>
41.

Int Main()
{
Int A = 10.5;
Printf("%D",A);
Return 0;
}

A. 10.5
B. 10.0
C. 10
D. Compilation Error
Answer» C. 10
42.

Int Main()
{
Int _ = 10;
Int __ = 20;
Int ___ = _ + __;
Printf("__%D",___);
Return 0;
}

A. Compilation Error
B. Runtime Error
C. __0
D. __30
Answer» D. __30
43.

Int Main()
{
Int A = 5;
Int B = 10;
Int C = A+B;
Printf("%I",C);

A. 0
B. 15
C. Undefined I
D. Any Other Compiler Error
Answer» B. 15
44.

int main()
{
int x;
x=10,20,30;
printf("%d",x);
return 0;
}

A. 10
B. 20
C. 30
D. Compilation Error
Answer» A. 10
45.

How many times C.com is printed?
int main()
{
int a = 0;
while(a++ < 5-++a)
printf("C.com");
return 0;
}

A. 5 times
B. 4 times
C. 3 times
D. 1 times
Answer» D. 1 times
46.

How many times C.com is printed?
int main()
{
int a = 0;
while(a++ < 5)
printf("C.com");
return 0;
}

A. 5 times
B. 4 times
C. 3 times
D. 1 times
Answer» A. 5 times
47.

How many times C.com is printed?
int main()
{
int a = 0;
while(a++)
printf("C.com");
return 0;
}

A. 1 time
B. 0 time
C. Infinite times(Untill Stack is overflow)
D. 2 times
Answer» B. 0 time
48.

How many times C.com is printed?
int main()
{
int a = 0;
while(++a)
{
printf("C.com");
}
return 0;
}

A. 1 time
B. Infinite Times(Untill Stack is overflow)
C. 2 times
D. Error
Answer» B. Infinite Times(Untill Stack is overflow)
49.

What is output of below program?
int main()
{
int i,j,count;
count=0;
for(i=0; i<5; i++);
{
for(j=0;j<5;j++);
{
count++;
}
}
printf("%d",count);
return 0;
}

A. 55
B. 54
C. 1
D. 0
Answer» C. 1
50.

What is output of below program?
int main()
{
int i,j,k,count;
count=0;
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
count++;
}
}
printf("%d",count);
return 0;
}

A. 5
B. 10
C. 25
D. 50
Answer» C. 25

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.