c pgm count no of lines , blanks, tabs in a para(File concept)
Answer Posted / shanker khandelwal (bce mohali
include <stdio.h>
void main()
{
FILE *FP;
char Ch;
int l=o,b=0,t=0,p=0;
FP = fopen(filename, mode);
while (FP) {
if(ch==EOF)
break;
l++;
if(ch==" ")
b++;
if(ch=="\n")
p++;
if(ch=="\t")
t++;
fclose(fp);
display counts;
getch();
}
Is This Answer Correct ? | 16 Yes | 10 No |
Post New Answer View All Answers
How to delete a node from linked list w/o using collectons?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What are the primitive data types in c?
How do we open a binary file in Read/Write mode in C?
What is hungarian notation? Is it worthwhile?
Write a program to generate random numbers in c?
What does %p mean c?
What is the difference between int main and void main in c?
What is the acronym for ansi?
What is the significance of scope resolution operator?
Is it possible to execute code even after the program exits the main() function?
What does *p++ do?
What is a class c rental property?
What are the 5 data types?
What are the different categories of functions in c?