. Write a program to get a string and to convert the 1st
letter of it to uppercase
Answers were Sorted based on User's Feedback
Answer / darshana
Dim str As String
Dim ch() As Char
Console.WriteLine("enter a string")
str = Console.ReadLine()
ch = str.ToCharArray
Console.Write(Char.ToUpper(ch(0)))
For i As Integer = 0 To ch.GetUpperBound(0) - 1
Console.Write(ch(i + 1))
Next
Console.WriteLine()
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / kiran
void main()
{
char str[20];
int i=0;
printf("Enter your name : ");
gets(name);
if(str[i] >= 97 && str[i]<=122)
str[i] = str[i] - 32;
printf("The new String is %s",str);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
what would be the output of the follwing struct st { char name[20]; int i; float f; }; main() { struct st emp = {"forum"}; printf("%d %f",emp.i,emp.f); }
Explain what are preprocessor directives?
can we write a c program with out using main
What is bubble sort in c?
how to use showbits function?
What is the diffrent between while and do while statement ?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
how to create duplicate link list using C???
whitch value return void main?
Explain how can you determine the size of an allocated portion of memory?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
What is unary operator?