1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yawa3891 [41]
3 years ago
12

Assume that input file references a Scanner object that was used to open a file. Which of the following while loops shows the co

rrect way to read data from the file until the end of the file is reached?a. while (inputFile != null)b. while (!inputFile.EOF)c. while (inputFile.hasnextInt())d. while (inputFile.nextLine == " ")
Computers and Technology
1 answer:
Brut [27]3 years ago
4 0

while (!inputFile.EOF) loops shows the correct way to read data from the file until the end of the file is reached.

b. while (!inputFile.EOF)

<u>Explanation:</u>

Normally to read an input files as loop the program reads till end of file mark been seen.  A loop been executed till an EOF is reached.

End user has to write a logic in software languages  which should have a loop and ready a bit or set of bits which depends of end user technology and stop reading till end of file which is called  EOF = true.  

If EOF is not true then end user program loop never ends and program is either hang or bug or goes to really task.

End user has check either EOF = True or files size reach to end of bytes. Whichever comes first.

Otherwise if EOF is not true then it is corrupted files.

You might be interested in
Which two statements give good definitions of financial credit
iren2701 [21]
The two <span>statements that give good definitions of financial credit are :            1) Balance Sheet & 2) Income Statement.  
</span>
1) Balance sheet shows the assets, liabilities, and net worth on a
    given date;
2) Income statement (profit & loss account), shows how the net income of
    the firm is arrived at over a stated period. 
Another statement is Cash flow statement, which shows the inflows and outflows of cash caused by the firm's activities during a given period of time.
3 0
3 years ago
What is the statement terminator for PHP?
Colt1911 [192]

Answer:

?>

Explanation:

The statement terminator for PHP language is ?>

PHP i.e. Hypertext Preprocessor.

It is widely used open source general purpose scripting language that is especially suited for web development and can be embedded into HTML.

PHP opening and closing tags are <? and ?> respectively.

hope you got the point any question can be asked in comments will be answered duly.

5 0
3 years ago
Write a program that can print a banner with rotated letters, such that they can be read from top to bottom. Specifically, each
My name is Ann [436]

Answer:

package Lab6Problema;

import java.util.Scanner;

public class Lab6Problema{

public static void H() // prints H

{

System.out.println();

System.out.println("** **");

System.out.println("** **");

System.out.println("******");

System.out.println("** **");

System.out.println("** **");

}

 

public static void E()//prints E

{

System.out.println();

System.out.println("******");

System.out.println("** ");

System.out.println("******");

System.out.println("** ");

System.out.println("******");

}

 

public static void L()//prints L

{

System.out.println();

System.out.println("* ");

System.out.println("* ");

System.out.println("* ");

System.out.println("* ");

System.out.println("******");

}

 

public static void O()//prints O

{

System.out.println();

System.out.println("******");

System.out.println("* *");

System.out.println("* *");

System.out.println("* *");

System.out.println("******");

}

 

public static void W()//prints W

{

System.out.println();

System.out.println("* *");

System.out.println("* *");

System.out.println("* ** *");

System.out.println("* ** *");

System.out.println("** **");

}

 

public static void R()//prints R

{

System.out.println();

System.out.println("***** ");

System.out.println("** **");

System.out.println("***** ");

System.out.println("** **");

System.out.println("** **");

}

 

public static void D()//prints D

{

System.out.println();

System.out.println("**** ");

System.out.println("* * ");

System.out.println("* *");

System.out.println("** * ");

System.out.println("**** ");

}

public static void blank() //prints blank space

{

System.out.println();

System.out.println();

System.out.println();

}

public static void main(String[] args) {

//just enter "Hello World" as input as specified

System.out.println("Enter a Message");

Scanner scan=new Scanner(System.in);

String myMessage=scan.nextLine(); // read msg using scanner

int numOfCharacters=myMessage.length();// calculate message lenth

for(int i=0;i<numOfCharacters;i++) // loop through each chracter in msg

{

// gets character at position i, and switch accordingly

switch(myMessage.charAt(i))

{

// if character is 'H' or 'h', call method H(). Similarly for other

// Hecharacters in message.

case 'H':

case 'h':H();break;

case 'E':

case 'e':E();break;

case 'L':

case 'l':L();break;

case 'O':

case 'o':O();break;

case 'W':

case 'w':W();break;

case 'R':

case 'r':R();break;

case 'D':

case 'd':D();break;

case ' ':blank();break;

}

}

}

}

Explanation:

4 0
3 years ago
U
JulijaS [17]

Answer:

sgvxvb

Explanation:

cbcbcbcb

6 0
3 years ago
Proper humidity and temperature for information systems equipment is an example of what type of security?
lidiya [134]

Answer:

Administrative security

3 0
3 years ago
Other questions:
  • _______ are unprocessed facts that a computer feeds on.
    5·1 answer
  • Under what driving conditions will 2019 Nissan LEAF’s available Rear Cross Traffic Alert (RCTA) warn the driver if a vehicle is
    11·1 answer
  • Whitespace consists of all of the following, except
    11·2 answers
  • For almost all networks today, including the internet, the communication protocol used is called ____.
    15·1 answer
  • Who is the father of computer​
    12·2 answers
  • The strength of gravity on the Moon is 1.6
    14·1 answer
  • Answer quick plzzz I only have 2 hours
    13·2 answers
  • a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The marketing department has collect
    13·1 answer
  • "NOTE: write an algorithm, not a code" You are given a file called "std" and composed of "Number, Name, Address" fields. (You ca
    15·1 answer
  • Chức năng của hàm MOD(number, divisor)?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!