C Language Objective Questions
Who is the father of C language?
- Dennis Ritchie
- James Gosling
- Bharne Strouptrup
- Guido van Rossum
- option1 Clear All
Clear All
What is the correct syntax to declare a variable in C?
- declare x;
- X int;
- int x;
- var x;
- option3 Clear All
Clear All
What is the size of int in C (32-bit system)?
- 2 bytes
- 4 baytes
- 8 baytes
- 1 baytes
- option2 Clear All
Clear All
Which of the following is a valid identifier in C?
- int
- float
- _value
- 2value
- option3 Clear All
Clear All
What will printf("%d", 5 + 3); output?
- 53
- 8
- Error
- Garbage
- option2 Clear All
Clear All
Which of the following is not a loop in C?
- for
- do_while
- while
- repeat-until
- option4 Clear All
Clear All
What is the use of break keyword?
- Function को रोकने
- Loop को समाप्त करने
- Execution को रोकने
- Program बंद करने
- option2 Clear All
Clear All
Which data type is used for characters?
- In
- char
- string
- float
- option2 Clear All
Clear All
What is the default return type of main() function in C?
- void
- char
- int
- float
- option3 Clear All
Clear All
Which operator is used for equality check in C?
- =
- :=
- ==
- !=
- option3 Clear All
Clear All
Which symbol is used to comment a single line in C?
- //
- /*
- ##
- <!--
- option1 Clear All
Clear All
The scanf() function is used for?
- Printing output
- Declaring variable
- Taking input
- None
- option3 Clear All
Clear All
What is the output of printf("%c", 65);?
- A
- 65
- Error
- a
- option1 Clear All
Clear All
Which header file is required for printf() and scanf()?
- Stdlib.h
- conio.h
- string.h
- stdio.h
- option4 Clear All
Clear All
Which of the following is a logical operator?
- &&
- ++
- --
- %
- option1 Clear All
Clear All
Which is the correct syntax to use pointer?
- int ptr;
- Int ptr:
- *int ptr;
- int &ptr;
- option1 Clear All
Clear All
What is an array?
- Structure
- Collection of variables of different types
- Collection of variables of same type
- Pointer
- option3 Clear All
Clear All
C language was developed at?
- MIT
- Bell Labs
- Microsoft
- NASA
- option2 Clear All
Clear All
The loop which is guaranteed to execute at least once:
- for
- while
- do-while
- None
- option3 Clear All
Clear All
Which one is not a storage class in C?
- auto
- static
- register
- volatile
- option3 Clear All
Clear All