[go: up one dir, main page]

0% found this document useful (0 votes)
26 views5 pages

#Include #Include

The C code takes in a string, loops through each character, capitalizes the first letter of each word by printing the first character and capitalizing subsequent characters after spaces.

Uploaded by

Easteak Ahamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views5 pages

#Include #Include

The C code takes in a string, loops through each character, capitalizes the first letter of each word by printing the first character and capitalizing subsequent characters after spaces.

Uploaded by

Easteak Ahamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

#include<stdio.

h>

#include<string.h>

int main(){

char name[100];

gets(name);

int i;

for (i=0; name[i] != '\0'; i++){

if (i == 0)

printf("%c", name[i]);

continue;

if(name[i] == ' '){

printf(".%c", name[i+1]);

return 0;

}
#include<stdio.h>

#include<string.h>

int main(){

char name[100];

gets(name);

int i;

for (i=0; name[i] != '\0'; i++){

if (i == 0)

printf("%c", name[i]);

continue;

if(name[i] == ' '){

printf(".%c", name[i+1]);

return 0;

}
3.

#include<stdio.h>

#include<string.h>

int main(){

char name[100];

gets(name);

int i;

for (i=0; name[i] != '\0'; i++){

if (i == 0)

printf("%c", name[i]);

continue;

if(name[i] == ' '){

printf(".%c", name[i+1]);

return 0;

}
3. #include<stdio.h>

#include<string.h>

int main(){

char name[100];

gets(name);

int i;

for (i=0; name[i] != '\0'; i++){

if (i == 0)

printf("%c", name[i]);

continue;

if(name[i] == ' '){

printf(".%c", name[i+1]);

return 0;

You might also like