50 CÂU HỎI
Maximum number of arguments that a function can take is 12
A. Yes
B. No
Usually recursion works slower than loops
A. Yes
B. No
In a function two return statements should never occur.
A. Yes
B. No
There is a error in the below program. Which statement will you add to remove it
A. Add prototype: float f(int, float);
B. Add prototype: float f(a, b);
C. Add prototype: float f(float a, int b)
Every function must return a value
A. Yes
B. No
Which of the following statements are correct about the program?
A. It prints garbage values infinitely
B. Runs infinitely without printing anything
C. Error: main( ) cannot be called inside printf( )
D. No Error and print nothing
Will the following functions work?
A. Yes
B. No
If a function contains two return statements successively, the complier will generate warnings. Yes / No?
A. Yes
B. No
Functions can not return a floating point number
A. Yes
B. No
What will be the output of the program?
A. 543210
B. 54321
C. 12345
D. Infinite loop
What will be the output of the program?
A. 4
B. 5
C. 6
D. Another
Point out a error of the following program
A. Missing parenthesis in return statement
B. The function should be defined as int f(int a, int b)
C. Re-declaration of a
D. None of above
Point out the error in the program
A. Error: Prototype declaration
B. No error
C. Error: return statement cannot be used with conditional operators
D. None of above
What will be the output of the program?
A. 6 6
B. 5 6
C. Complier error
D. None of above
What will be output of the program?
A. 4, 3, 4, 3
B. 4, 4, 5, 5
C. 3, 4, 3, 4
D. None of above
Which of the following statements are correct about this function
A. The function calculates the value of 1 raised to power n
B. The function calculates the factorial value of an integer
C. The function calculates the square root of an integer
D. None of above
Point out the error in the following program
A. Error: cannot convert ‘void’ to ‘int’
B. Error:
What will be output when you will execute following c code? Biết kích thước kiểu char : 1 byte, float : 4 byte, int : 4 byte, double : 8 byte, long : 4 byte.
A. 8 4 1
B. 8 2 1
C. 4 4 1
D. Depend on complier
What will be output when you will execute following c code?
A. 1 4 5
B. 1 4 7
C. 8 4 7
D. Another
What value gets printed by the program below?
A. 1
B. 0
C. 0.1
What will be output when you will execute following c code?
A. -6
B. 5
C. 4
D. Another
What will be output when you will execute following c code?
A. Avatar
B. Alien
C. Error at (*)
D. Another
What will be output when you will execute following c code?
A. 7
B. 8
C. 9
D. Another
What is output ?
A. 4
B. 0
C. 1
D. 5
What is output ?
A. 7
B. 6
C. 5
D. 1
What is output ?
A. 0
B. Error
C. 1
D. x isn’t defined
What is output ?
A. 0
B. 1
C. Error Comlier
What is output ?
A. 1 1
B. 1 0
C. ‘x’ undeclared identifier
Output of following code?
A. 1
B. 0
C. Error
Output of following code?
A. 1
B. Error
C. 0
Output of following code?
A. 0123456789
B. 0000000000
C. 0101010101
Output of following code?
A. 1
B. 5
C. 20
D. ‘x’ isn’t defined
What is output?
A. Garbage Garbage Garbage
B. 5 10 15
C. 15 10 5
D. Run time error
What is output?
A. c:/tc/bin/rw.c
B. c: c inw.c
C. c:cinw.c
D. w.c in
What is output ?
A. 5
B. 6
C. 0
D. Complier error
What is output?
A. 135
B. 8
C. -121
D. 121
What is output?
A. 12480
B. 1248@
C. 12500
D. 12522
What is output?
A. Hi
B. Hello
C. None of above
What is output of program?
A. i = 0
B. i = 1
C. Error
D. None of these
Which of the declaration is correct?
A. int length;
B. char int;
C. int long;
D. float double;
What is output of program?
A. N = 20
B. N = 10
C. Error
D. No Output
What is output of program?
A. 0 0 0
B. 1 2 2
C. 1 1 1
D. Error
What is output of program?
A. 3
B. 4
C. Complier Error
D. 3.14
Which of the following operations are INCORRECT?
A. int i = 35; i = i%5
B. short int j = 5; j = j;
C. long int k = 123L; k = k;
D. float a = 3.14; a = a%3;
Point out a error in the following program
A. Error: Declaration syntax error v (or) ‘v’: illegal use of type ‘void’
B. Program terminate abnormally
C. No error
D. None of these
In the following program how long will the for loop get executed?
A. The for loop would not get executed at all
B. The for loop would get executed only once
C. The for loop would get executed 5 times
D. The for loop would get executed infinite times
Point out the error in the following program (if it is compiled with Turbo C complier)
A. No error
B. display( ) is not declared
C. None of these
Which of the following are unary operators in C?
1. !
2. sizeof
3. ~
4. &&
A. 1, 2
B. 1, 3
C. 2, 4
D. 1, 2, 3
In the expression a = b = 5 the order of Assignment is NOT decided by Associativity of operators.
A. True
B. False
Which of the following is the correct order if calling functions in the below code?
A. f1, f2, f3
B. f3, f2, f1
C. Order may vary from complier to complier
D. None of above