answersLogoWhite

0


Best Answer

You should have a separate variable to count each of those:

long nline, int npunct, nspace, ndigits;

...

printf ("%ld %ld %ld %ld\n", nline, int npunct, nspace, ndigits);

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you display the number of lineswordspunction markswhite space and digits in a text file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What can a decrease decimal tool do in excel?

It reduces the number of digits after the decimal point in the display, rounding the number as appropriate.


What is the largest prime number in digits?

As of January 25, 2014, the largest known prime number was calculated to be 257,885,161 − 1; a number containing 17,425,170 digits. This is, of course, too large to display.


Does a calculator display the exact values of all irrational numbers?

No. An irrational number is one that does not repeat or finish, and a calculator cannot display millions of digits like an irrational number would have.


How many times a day does a digital clock display digits whose sum total equals the number of led's used to display them?

A 24 hour clock displays digits whose sum total equals the number of led's used to display them 94 times a day. A 12 hour clock displays them 108 times a day.


Why is it sometimes when you add 2 numbers in scientific notation in your calculator the result is just greater of the two numbers?

This happens because the contribution of the smaller number is lost in the trailing decimal digits. Suppose you had a calculator that could display 10 digits. Suppose you tried to add 123,456.789 and 0.000 000 12 The true answer is 123,456.789 000 12 but, since you can only display 10 digits, the answer shows as 123,456.7890 which is the larger number. The exact details will depend on the number of displayed digits.


How do you Calculating percentage in excel that is less than 1?

Your question is a little vague, but it sounds like a display issue. Specifically, it sounds like you have your number display set to show zero digits past the decimal point. Simply select the cell you're interested in reformatting, click on Format/Cells/Number/Percentage and make sure you have it set to display at least one (if not more) decimal digits.


How does Excel dispay year?

Excel can display the year as a number. You can get it to display in different ways as part of a full date, such as having 2 or 4 digits to represent it. There is also a YEAR function, to extract just the year from a full date, which is then displayed as a number.


What number is less than 10 and has perpendicular lines?

If you form the digits with a seven-segment LED display, then all of the digits except '1' have perpendicular lines.


What is the value of the expression -29?

Finding the value of a number is pretty easy ... the digits and their places are symbols that display the value of a number right out in the open. The value of -29 is negative twenty-nine.


Write a program in java to enter 3 digits or more arrange the digits of the entered number in ascending order and display the result?

public static void main(String[] args) { int val = 100; int val1 = 50; System.out.println("Number of digits in " + val + " is: " + new String(val + "").length()); System.out.println("Number of digits in " + val1 + " is: " + new String(val1 + "").length()); }


What number has thirteen digits?

The number 1,234,567,890,123 has thirteen digits.


What does a Merchant Number look like?

A Merchant Number is usually between 6 and 15 digits long. Examples: Natwest Streamline Merchant Number = 8 digits HSBC Merchant Number = 8 digits Lloyds TSB Cardnet Merchant Number = 15 digits Bank of Scotland Merchant Number = 15 digits Barclays Merchant Services Merchant Number = 7 digits American Express Merchant Number = 10 digits Diners Club Merchant Number = 10 digits JCB (Japan Credit Bureau) Merchant Number = 13 digits Elavon Merchant Number = 10 digits AIB (Allied Irish Bank) Merchant Number = 11 digits Ulster Bank (For Ireland Vendors only) Merchant Number = 8 digits Chase Payment Tech Merchant Number = 6 digits