c pgm count no of lines , blanks, tabs in a para(File concept)

Answer Posted / saagar gugwad

#include <stdio.h>

int main()
{
FILE *FP;
char Ch;
FP = fopen(filename, mode);
while (FP) {
Ch=getch(FP);
switch(Ch) {
case ' '://incremnt space
break;
case ''://check all consitions
}
display counts;
}
}

Is This Answer Correct ?    3 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function and its example?

629


Can we change the value of constant variable in c?

579


Write a program to reverse a string.

643


Compare and contrast compilers from interpreters.

684


What is pointers in c with example?

584






Does free set pointer to null?

565


What is a example of a variable?

554


Is there a way to switch on strings?

622


What is the difference between text and binary modes?

648


What is operator promotion?

630


How many bytes is a struct in c?

726


Where are some collections of useful code fragments and examples?

717


What is #include cctype?

581


How can you find the exact size of a data type in c?

602


What is c definition?

750