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
Answers were Sorted based on User's Feedback
Answer / ganesh
char s[15];int n,i;
scanf("%s",s,printf("give a name:"));
for(i=0;i<strlen(s);i++)
{
if(s[i]==tolower(s[i]))
putchar(toupper(s[i]));
else
putchar(tolower(s[i]));
}
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / vadivelt
The ans without using lib function tolower() & toupper()
#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 ? | 7 Yes | 3 No |
Answer / bijoy
#include<stdio.h>
main()
{
printf("your name");
getchar();
}
Is This Answer Correct ? | 0 Yes | 0 No |
2. Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers.
what is available in C language but not in C++?
10 Answers CTS, TCS,
How to Throw some light on the splay trees?
what is the format specifier for printing a pointer value?
What are the modifiers available in c programming language?
What is a built-in function in C?
implement NAND gate logic in C code without using any bitwise operatior.
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Explain in detail how strset (string handling function works )pls explain it with an example.
What is a protocol in c?
where do we use volatile keyword?
Define function pointers?