. 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 |
Is c dynamically typed?
what is diffrence between string and character array?
How to implement a packet in C
What will be your course of action for a push operation?
What is the advantage of a random access file?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
What is the difference between getch() and getche()?
Difference between MAC vs. IP Addressing
Why do we need a structure?
Differentiate between calloc and malloc.
Write a program for finding factorial of a number.
Is it acceptable to declare/define a variable in a c header?