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
What are integer variable, floating-point variable and character variable?
c program for searching a student details among 10 student details
What is the best way of making my program efficient?
Can a variable be both static and volatile in c?
given post order,in order construct the corresponding binary tree
difference between Low, Middle, High Level languages in c ?
What is quick sort in c?
Is c is a procedural language?
What does %c do in c?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is an array in c?
How does selection sort work in c?
How does #define work?
Write a program to print “hello world” without using semicolon?
What are disadvantages of C language.