c pgm count no of lines , blanks, tabs in a para(File concept)
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
c program for searching a student details among 10 student details
implement general tree using link list
Can we increase size of array in c?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is pass by reference in c?
What are different types of variables in c?
related to rdbms query .
Explain what are multibyte characters?
what is the difference b/w compiler and debugger?
Is c language still used?
Is it better to use malloc() or calloc()?
If an old women's age is the same as her three grand daughters i,mean the number of days old child=the no of weeks old child=no of months old child .The total yrs of all these ppl is 114 yrs...then how old is the old woman? the yr has 365 days..and 30 days each month.