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...


Write a program to count the number of characters, number of
words, number of line in file.

Answers were Sorted based on User's Feedback



Write a program to count the number of characters, number of words, number of line in file...

Answer / jayakrishnan

File.ReadAllLines("").Length;
File.ReadAllText("").Split(' ').Length - 1;
File.ReadAllText("").Length

Is This Answer Correct ?    5 Yes 3 No

Write a program to count the number of characters, number of words, number of line in file...

Answer / ashutosh mishra

#include <stdio.h>

main()
{
int i,j,n,c=0,b;
printf("enter the number to be checked\n");
scanf("%d",&n);
j=n;
for(i=1;i<n;i++)
{
b=n%i;
if(b==0)
{
c=c+i;
}
}
if(c==j)
printf("the given number is perfect number\n");
else
printf("the given number is not a perfect number\n");
getch();
}

Is This Answer Correct ?    5 Yes 11 No

Post New Answer

More C Sharp Code Interview Questions

Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long

2 Answers   Mind Tree,


program to reverse the order of words in a string.

2 Answers   Mind Tree,


how to change password in .net with c # with ado.net and also SQL server 2008 change password

1 Answers  


Coding for Manipulate XML File Data Using C#?

1 Answers  


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)

1 Answers  


How to Link Different Data Sources Together?

0 Answers  


How to Create Files by Using the FileInfo Class?

1 Answers  


Code for Working with Files under a Directory?

1 Answers  


Give the code for Handling Mouse Events?

0 Answers  


Code for IP Address Comparison and Conversion in C#?

0 Answers  


How to pass multiple rows from one gridview to another gridview after clicking the checkbox.

1 Answers   Satyam,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)