What does System.in.read() return?

1 Answer

Answer :

A: It returns the number of bytes read from the Input Stream as an integer.

Related questions

Description : Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100) x = CBSE (x +10); return (x - 1); } public static void main (String[] args){ System.out.print(First.CBSE(60)); } } What does this program print? (1) 59 (2) 95 (3) 69 (4) 99

Last Answer : (2) 95 

Description : Can there be multiple return statements in a function?

Last Answer : A: Yes, but only one of them is executed.

Description : What is the use of return keyword?

Last Answer : A: return keyword is used to return any value from a function. It denotes the end of a function.

Description : Methods can be overloaded with a difference only in the type of the return value .. A) Not supported B) False C) True D) None of the above

Last Answer : B) False

Description : Which of the following do not represent legal flow control statements? A) break; B) return; C) exit(); D) continue outer;

Last Answer : C) exit();

Description : Which of the following do not represent legal flow control statements? A) break; B) return; C) exit(); D) continue outer;

Last Answer : C) exit();

Description : State True or False. i) While overloading operators new operator can be overloaded. ii) The binary operator such as +, -, * and must explicitly return a value. A) True, True B) True, False C) False, True D) False, False

Last Answer : C) False, True

Description : State True or False i) A destructor never takes any argument nor does it return any value. ii) It releases memory space for future use. A) True, True B) True, False C) False, True D) False, False

Last Answer : A) True, True

Description : Which of the following characteristics of constructor are true. i) They should be declared in the public section. ii) They are invoked automatically when the objects are created. iii) They do not have return type and void also. ... and v C) Only i, iii, iv and v D) All i, ii, iii, iv and v

Last Answer : D) All i, ii, iii, iv and v

Description : Some of the situations where inline expansion may not work are: A) For functions returning values, if a loop, a switch or goto exists. B) If functions contain static variables and they are re-cursive. C) For functions not returning values, if return statement exist. D) All of the above.

Last Answer : D) All of the above.

Description : In C++, the keyword void was used ……….. A) To specify the return type of function when it is not returning any value. B) To indicate an empty argument list to a function. C) To declare the generic pointers. D) All of the above.

Last Answer : D) All of the above.

Description : If a is an integer variable, a=7/3; will return a value A) 2.5 B) 3 C) 0 D) 2

Last Answer : D) 2

Description : The rate of ……………. Is always an important factor for management especially in relation to the rate of return A) Cost B) Benefit C) Sales D) Investment

Last Answer : D) Investment

Description : Which of the following commands would return process_id of sleep command? (A) Sleep 1 and echo $? (B) Sleep 1 and echo $# (C) Sleep 1 and echo $x (D) Sleep 1 and echo $!

Last Answer : (D) Sleep 1 and echo $!

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : Consider the following three SQL queries (Assume the data in the people table) : (a) Select Name from people where Age>21; (b) Select Name from people where Height>180; (c) Select Name from people where (Age>21) or (Height ... number of rows returned by the SQL query (c) ? (A) 3 (B) 7 (C) 10 (D) 21

Last Answer : (C) 10

Description : Implicit return type of a class constructor is: (A) not of class type itself (B) class type itself (B) a destructor of class type (D) a destructor not of class type 

Last Answer : (B) class type itself

Description : What is the value returned by the function f given below when n = 100 ? int f(int n)  { if (n==0) then return n;  else return n + f(n-2);  } (A) 2550 (B) 2556 (C) 5220 (D) 5520

Last Answer : (A) 2550

Description : System.in.read() is being used, the program must specify the .................. clause. A) throws.java.out.IOException B) throws.java.in.IOException C) throws.java.io.IOException D) throws.java.io.InException

Last Answer : C) throws.java.io.IOException

Description : Which command is used to remove the read permission of the file 'note' from both the group and others? A. chmod go+r note B. chmod go+rw note C. chmod go-x note D. chmod go-r, 4-x note E. None of the above

Last Answer : D. chmod go-r, 4-x note

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : A DFD is normally leveled as A) It is a good idea in design B) It is recommended by many experts C) it is easy to do it D) It is easier to read and understand a number of smaller DFDs than one large DFD

Last Answer : D) It is easier to read and understand a number of smaller DFDs than one large DFD

Description : Read the code shown below carefully and pick out the keys? d = {"john":40, "peter":45} a) “john”, 40, 45, and “peter” b) “john” and “peter” c) 40 and 45 d) d = (40:”john”, 45:”peter”)

Last Answer : b) “john” and “peter”

Description : For the 8-bit word 00111001, the check bits stored with it would be 0111. Suppose when the word is read from memory, the check bits are calculated to be 1101. What is the data word that was read from memory? (A) 10011001 (B) 00011001 (C) 00111000 (D) 11000110

Last Answer : (B) 00011001

Description : Let Pi and Pj be two processes, R be the set of variables read from memory, and W be the set of variables written to memory. For the concurrent execution of two processes Pi and Pj, which of the following conditions is not true? (A) R(Pi)∩W(Pj)=Φ (B) W(Pi)∩R(Pj)=Φ (C) R(Pi)∩R(Pj)=Φ (D) W(Pi)∩W(Pj)=Φ

Last Answer : (C) R(Pi)∩R(Pj)=Φ 

Description : Consider a disk with 16384 bytes per track having a rotation time of 16 msec and average seek time of 40 msec. What is the time in msec to read a block of 1024 bytes from this disk? (A) 57 msec (B) 49 msec (C) 48 msec (D) 17 msec

Last Answer : Answer: B

Description : Suppose that the time to do a null remote procedure call (RPC) (i.e, 0 data bytes) is 1.0 msec, with an additional 1.5 msec for every 1K of data. How long does it take to read 32 K from the file server as 32 1K RPCs? (A) 49 msec (B) 80 msec (C) 48 msec (D) 100 msec

Last Answer : (B) 80 msec

Description : titles _ _ In Tarabi's prayer, the Imam quickly returned the salutation. There is no time to read anything except the first tashahhud. He returned the salutation before reciting the second Tashahhud (Durood ... for me to return the prayer salutation ? Or is it necessary to read Ibrahim in Durude ?

Last Answer : Alhamdulillah. One: The scholars have expressed some opinions regarding the command to recite Durood to the Prophet (peace and blessings of Allaah be upon him) in the Tashahhud of the prayer. Some ... a result of which the muqtadis cannot perform what is obligatory upon them. Allah is All-Knowing.

Description : What are the tasks performed by operating system? 

Last Answer :  It loads programs into memory and executes them.  It controls the operation of input/output and storage devices.  It manages files and folders.  It allows creating a password to protect computers from unauthorized use.   It detects hardware failures and displays messages to fix them. 

Description : ____________is the delivery of on-demand computing services, from applications to storage and processing power, typically over the internet and on a pay-as-you-go basis. a) Cloud computing b) Cloud Infrastructure c) Distributed system d) None of these

Last Answer : Cloud computing

Description : Why is the ‘S’ of System.out.println() function capital?

Last Answer : A: System is the name of a class present in java,lang package and hence it begins with a capital letter as is the convention for class names.

Description : What is the use of out in System.out.println()?

Last Answer : A: ‘out’ is an object of the ‘PrintStream class and a static data member of the’System’ class which is calling the println() function.

Description : The agency that sits between the user and the UNIX system is called the A. logic B. profile C. shell D. erxc E. None of the above

Last Answer : C. shell

Description : The out object is an object encapsulated inside the ................. class, and represents the standard output device. A) standard B) local C) globlal D) system

Last Answer : D) system

Description : Java Servlet i) is key component of server side java development ii) is a small pluggable extension to a server that enhances functionality iii) runs only in Windows Operating System iv) allows developers to customize any java ... & iv are true C) ii, iii & iv are true D) i, ii & iv are true

Last Answer : D) i, ii & iv are true

Description : break statement is used to i) get out of method ii) end aprogram iii) get out of a loop iv) get out of the system A) 1 & 2 B) 1,2 & 3 C) 1 & 3 D) 3

Last Answer : D) 3

Description : C programs are converted into machine language with the help of A) An Editor B) A complier C) An operating system D) None of the above

Last Answer : B) A complier

Description : C can be used on A) Only MS-Dos operating System B) Only Linux operating system C) Only Windows operating system D) All of the above

Last Answer : D) All of the above

Description : In …………….., the virus places an identical copy of itself into other programs or into certain system areas on the disk. A) Dormant phase B) Propagation phase C) Triggering phase D) Execution phase

Last Answer : B) Propagation phase

Description : State whether true of false. i) A worm mails a copy of itself to other systems. ii) A worm executes a copy of itself on another system. A) True, False B) False, True C) True, True D) False, False

Last Answer : C) True, True

Description : The type of threats on the security of a computer system or network are …………………….. i) Interruption ii) Interception iii) Modification iv) Creation v) Fabrication A) i, ii, iii and iv only B) ii, iii, iv and v only C) i, ii, iii and v only D) All i, ii, iii, iv and v

Last Answer : C) i, ii, iii and v only

Description : In computer security, …………………….. means that the information in a computer system only be accessible for reading by authorized parities. A) Confidentiality B) Integrity C) Availability D) Authenticity

Last Answer : A) Confidentiality

Description : In computer security, ……………………. means that computer system assets can be modified only by authorized parities. A) Confidentiality B) Integrity C) Availability D) Authenticity

Last Answer : B) Integrity

Description : File management function of the operating system includes i) File creation and deletion ii) Disk scheduling iii) Directory creation iv) Mapping file in secondary storage. A) i, ii and iii only B) i, iii and iv only C) ii, iii and iv only D) All i, ii, iii and iv

Last Answer : B) i, iii and iv only

Description : Which of the following are the functions of operating system? i) recovering from errors ii) facilitating input/output iii) facilitating parallel operation iv) sharing hardware among users v) implementing user interface A) i, ii, ... only C) ii, iii, iv and v only D) All i, ii, iii, iv and v

Last Answer : D) All i, ii, iii, iv and v

Description : In process scheduling, …………………… determines when new processes are admitted to the system. A) long term scheduling B) medium term scheduling C) short term scheduling D) none of the above

Last Answer : A) long term scheduling