img
Question:
Published on: 3 December, 2024

Write a C program to convert any name in short name.

Answer:

 

#include<stdio.h>
#include<conio.h>
int isupper(char);
main()
{
	char c;
	printf("\n Enter any name");
	while((c=getchar())!='\n')
	{
		if(isupper(c)==1)
		{
			putchar(c);
			putchar('.');
		}
	}
	getch();
}
int isupper(char x)
{
	if(x>='A'&&x<='Z')
	 return 1;
	else
	 return 0; 
}


Output:

Random questions