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 |
f(*p) { p=(char *)malloc(6); p="hello"; return; } main() { char *p="bye"; f(p); printf("%s",p); } what is the o/p?
how to TOGGLE Nth bit of variable in a MACRO
my name is nani i completed my b-tech in hyd now i want go for interveiw but i dont know the process of software field interveiws plz help me anyone how many rouds there n what rounds plz plz plz help me n where i can get these details
What is the difference between typeof(foo) and myFoo.GetType()?
please tell me the logic for this C program : INPUT (string):ABCD OUTPUT :BCDA CDAB DABC
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }
How. To pass the entrance test
main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(ā%dā,x); }
What is function prototype in c language?
write a program in c language to print your bio-data on the screen by using functions.
6 Answers College School Exams Tests, IBM,
code for selection sort?
What is a protocol in c?