Computer Applications
Write a method prototype name check() which takes an integer argument and returns a char:
- char check()
- void check (int x)
- check (int x)
- char check (int x)
User Defined Methods
ICSE 2023
26 Likes
Answer
char check (int x)
Reason — The prototype of a function is written in the given syntax:
return_type method_name(arguments)
Thus, the method has the prototype given below:
char check (int x)
Answered By
13 Likes
Related Questions
The absence of which statement leads to fall through situation in switch case statement?
- continue
- break
- return
- System.exit(0)
State the type of loop in the given program segment:
for (int i = 5; i != 0; i -= 2) System.out.println(i);- finite
- infinite
- null
- fixed
The number of values that a method can return is:
- 1
- 2
- 3
- 4
Predict the output of the following code snippet:
String P = "20", Q ="22"; int a = Integer.parseInt(P); int b = Integer.valueOf(Q); System.out.println(a + " " + b);- 20
- 20 22
- 2220
- 22