Write a C Program To Convert String in Uppercase Letter
WAY=1
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char nm[10],anm[10];
clrscr();
printf("Enter nm:");
fflush(stdin);
scanf("%s",nm);
printf("Uppercase:%s",strupr(nm));
getch();
}
WAY = 2
#include <stdio.h>
#include <string.h>
int main(void)
{
char *string = "Hello", *ptr;
clrscr();
/* converts string to upper case characters */
ptr = strupr(string);
printf("%s\n", ptr);
return 0;
}
WAY=1
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char nm[10],anm[10];
clrscr();
printf("Enter nm:");
fflush(stdin);
scanf("%s",nm);
printf("Uppercase:%s",strupr(nm));
getch();
}
WAY = 2
#include <stdio.h>
#include <string.h>
int main(void)
{
char *string = "Hello", *ptr;
clrscr();
/* converts string to upper case characters */
ptr = strupr(string);
printf("%s\n", ptr);
return 0;
}
No comments:
Post a Comment