Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


c pgm count no of lines , blanks, tabs in a para(File concept)

Answers were Sorted based on User's Feedback



c pgm count no of lines , blanks, tabs in a para(File concept)..

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

c pgm count no of lines , blanks, tabs in a para(File concept)..

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

Post New Answer

More C Interview Questions

When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?

2 Answers   Aloha Technology,


Write a program to generate the first n terms in the series --- 2,3,5,7,11,...,17

0 Answers  


What is structure padding in c?

0 Answers  


implement NAND gate logic in C code without using any bitwise operatior.

4 Answers   Alcatel,


What is nested structure with example?

0 Answers  


write a progrmm in c language take user interface generate table using for loop?

0 Answers  


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

0 Answers  


How to develop software using "c" programming?

1 Answers   IBM, TCS,


What is the use of a ‘’ character?

0 Answers  


is it possible to create your own header files?

0 Answers  


What is maximum size of array in c?

0 Answers  


can i know the source code for reversing a linked list with out using a temporary variable?

6 Answers   Honeywell,


Categories