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 is the general form of a C program?
Why do we need functions in c?
How do shell structures work?
What does c mean?
Explain what is the concatenation operator?
What’s the special use of UNIONS?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
What is the use of typedef in c?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Explain what is the difference between far and near ?
Why is this loop always executing once?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
List out few of the applications that make use of Multilinked Structures?
Are pointers integer?
In C language what is a 'dangling pointer'?