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 a void * in c?
What extern c means?
Explain c preprocessor?
What the different types of arrays in c?
Which is better between malloc and calloc?
What is the difference between struct and typedef struct in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is character constants?
i want to know the procedure of qualcomm for getting a job through offcampus
what does static variable mean?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
how should functions be apportioned among source files?
Explain the meaning of keyword 'extern' in a function declaration.
What is the scope of global variable in c?
Can you please explain the difference between malloc() and calloc() function?