C Programming Fundamentals
Essential C programming concepts including operators, loops, data types, and built-in functions
Questions
C programming was invented by ___________.
- Dennis Ritchie in 1972
- Dennis Lily in 1971
- George in 1972
- Runge Kutta in 1970
- Both Dennis Ritchie and Dennis Lily in 1972
Which of the following is a valid identifier?
- data 1
- fil_2
- a-b
- return
- for
If a=5 and b=8, what is the value of a & b?
- 0000
- 1101
- 0101
- 1000
- 1111
What is the value of floor (-5.2)?
- -5
- -6
- -5.2
- -4
- -7
If a=10 and b=20, what is the value of c=a>b?
- 10
- 20
- 15
- 0
- 1
What is the value of Ceil (-3.8) in C programming language?
- -3
- -4
- -5
- -2
- -3.8
If x=5 and y=++x, what are the values of x and y?
- x=5, y=5
- x=5, y=6
- x=6, y=6
- x=6, y=5
- x=5, y=7
If a=4, then b=a. What are the values of a and b?
- 4, 4
- 4,3
- 3,3
- 3,4
- 2,4
Which of the following explains (;;)?
- Finite loop
- Infinite loop
- Boolean 1
- Boolean 0
- None of the above
A double uses the size of ____________.
- 32 bit
- 64 bit
- 16 bit
- 80 bit
- 8 bit
If a=5 and b=7, then a | b is __________.
- 111
- 101
- 000
- 010
- 001
What is the value of a/b if both are floats; a=22.0 and b=3.0?
- 7
- 22/3
- 7.33
- 6
- 8
While loop is called ______________.
- entry controlled loop
- exit controlled loop
- exit-entry controlled loop
- entry-exit controlled loop
- output controlled loop
What is the value of 14%3+7%2 in C progamming language (where two operators are used; first is modulus operator and the second is addition operator)?
- 3
- 7.6
- 7.5
- 8.1
- 8
do while is called _________.
- entry controlled loop
- exit controlled loop
- input controlled loop
- output controlled loop
- entry-exit controlled loop