. 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



. Write a program to get a string and to convert the 1st letter of it to uppercase..

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

. Write a program to get a string and to convert the 1st letter of it to uppercase..

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

Post New Answer

More C Interview Questions

What is stack in c?

0 Answers  


how to count no of words,characters,lines in a paragraph.

0 Answers  


define c

6 Answers   HCL, TCS,


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

0 Answers  


Write a program to add the following ¼+2/4+3/4+5/3+6/3+... (Like up to any 12 no.s)

1 Answers   HTC,


Write a program to print all permutations of a given string.

0 Answers   JPMorgan Chase,


Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986

1 Answers  


What is the difference between c and python?

0 Answers  


what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }

3 Answers  


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

0 Answers  


how to multiply two number taking input as a string (considering sum and carry )

2 Answers   Wipro,


Is double link list a linear data structure? If Yes, Why?If No, Why?

4 Answers  


Categories