write a c program for print your name .but,your name may be
small
letter mean print a capital letter or your name may be
capital
letter mean print a small letter .example
\\enter ur name :
sankar
The name is: SANKAR
(or)
enter your name:SAnkar
The name is:saNKAR
Answer Posted / vadivelt
#include<stdio.h>
#include<conio.h>
void LowrUprCase(char *ptr);
int main()
{
char ptr[100];
printf("ENTER THE NAME:\n");
gets(ptr);
LowrUprCase(ptr);
printf("\nOUTPUT: %s \n",ptr);
getch();
}
void LowrUprCase(char *ptr)
{
while(*ptr != '\0')
{
if(*ptr >= 97 && *ptr <= 122)
{
*ptr = *ptr - 32;
}
else if(*ptr >= 65 && *ptr <= 90)
{
*ptr = *ptr + 32;
}
ptr++;
}
}
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
How can you avoid including a header more than once?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
Write a Program to accept different goods with the number, price and date of purchase and display them
What's the best way of making my program efficient?
How can I change their mode to binary?
What is a pointer in c?
How do I create a directory? How do I remove a directory (and its contents)?
What’s the special use of UNIONS?
What are the different types of control structures?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
What is queue in c?
i want to know the procedure of qualcomm for getting a job through offcampus
Why isnt there a numbered, multi-level break statement to break out
What are pointers? What are stacks and queues?
Why header file is used in c?