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 diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
How does sizeof know array size?
How does selection sort work in c?
Is that possible to add pointers to each other?
Explain low-order bytes.
what is data structure?
Difference between C and Embedded C?
What is getch c?
int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?
What is the difference between formatted&unformatted i/o functions?
What are two dimensional arrays alternatively called as?
What is the correct code to have following output in c using nested for loop?