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

please explain every phase in the "SDLC" in the dotnet.

2280


What are multidimensional arrays?

753


What will the preprocessor do for a program?

662


How was c created?

688


What is #include stdio h?

786






How do I create a directory? How do I remove a directory (and its contents)?

699


What is exit() function?

649


swap 2 numbers without using third variable?

751


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1712


What is use of #include in c?

699


Write a C program in Fibonacci series.

730


what will be the output for the following main() { printf("hi" "hello"); }

9708


how should functions be apportioned among source files?

722


What is data structure in c programming?

667


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1526