C program to count number of words in a string

Write a C program to count total number of words in a string using loop. How to find total number of words in a given string using loops in C programming. Logic to count total number of words in a string.

Example

Input

Input string: I love Codeforwin.

Output

Total number of words: 4

Read more

C program to count frequency of each character in a string

Write a C program to count frequency of each character in a string using loop. How to find frequency of each characters in a string in C programming. Logic to count frequency of each character in a given string in C program.

Example

Input

Input string: Codeforwin

Output

Frequency of all characters in the given string:
'c' = 1
'd' = 1
'e' = 1
'f' = 1
'i' = 1
'n' = 1
'o' = 2
'r' = 1
'w' = 1

Read more

Sending e-mails with attachment in C#

In previous post we saw how to send e-mails using C# in few simple steps. Here we will see how to add attachments to our messages. Know it: System.Net.Mail.Attachment : Used to attach any file to our MailMessage. GUI form: Implement it: using System; using System.ComponentModel; using System.Net.Mail; using System.Windows.Forms; namespace MailMe { public partial … Read more

Sending emails in C#

C# provides an easy solutions for sending mails in just few steps. Know it: Prior to main code file we first must look onto the classes .NET provides for sending mails and working with smtp protocol. All the mentioned classes are present under System.Net.Mail namespace. SmtpClient : Allows sending of emails using smtp protocol. MailMessage … Read more