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 |
What is the best way to comment out a section of code that contains comments?
What is the difference between near, far and huge pointers?
What is exit() function?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
Can you write the function prototype, definition and mention the other requirements.
What is difference between class and structure?
give one ip, find out which contry
What is Bitwise Operator and how it works?
what is the difference between getch() and getche()?
main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }
What is a static variable in c?
Write c-code for 5+55+555+5555+55555+555555+5555555. Output will be it's answer...