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 |
Hierarchy decides which operator a) is most important b) is used first c) is fastest d) operates on largest numbers
How do I send escape sequences to control a terminal or other device?
What are the features of c languages?
void main() { static int i = 5; if(--i) { main(); printf("%d ",i); } } what would be output of the above program and justify your answer? }
5 Answers C DAC, CDAC, Infosys, Wipro,
What does void main () mean?
Why c is called a mid level programming language?
what is the difference b/w NULL and null?
simple program for virtual function?
What are the different types of pointers used in c language?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Do you know what are bitwise shift operators in c programming?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.