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 'lex' does?
hi , please send me NIC written test papers to sbabavalli@gmail.com
Can we assign integer value to char in c?
which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;
6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()
Write a program in C to reverse a number by recursive function?
an algorithem for the implementation of circular doubly linked list
How many keywords are there in c?
What is getch?
code for find determinent of amatrix
What is queue in c?
What is chain pointer in c?