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
Answer / jayakrishnan
File.ReadAllLines("").Length;
File.ReadAllText("").Split(' ').Length - 1;
File.ReadAllText("").Length
| Is This Answer Correct ? | 5 Yes | 3 No |
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 |
program for string reverse(eg:- i am boy -> boy am i)
8 Answers Black Pepper, Infosys, Mind Tree,
program for straight line(y=mx+c)
Coding for Manipulate XML File Data Using C#?
how to change password in .net with c # with ado.net and also SQL server 2008 change password
c# code to Count number of 1's in a given range of integer (0 to n)
Write a program to count the number of characters, number of words, number of line in file.
how do i copy textbox contents of 1 form to another form
how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)
Automatically Hyperlink URLs and E-Mail Addresses in ASP.NET Pages with C#
Write a program to count 3Letter, 4Letter and 5Letter words from a file and print the number of 3Letter, 4Letter and 5Letter words. Delimiter is space, tab, hifen. Also we should not consider the line in the file after we encounter # in that line.
Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.
Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik