. 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

Describe advantages and disadvantages of the various stock sorting algorithms

1 Answers   Microsoft,


c program to input values in a table(using 2D array) and print odd numbers from them

1 Answers  


Can anyone tell what is stack overflow? what precaution we should take?

1 Answers  


WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE?

8 Answers   Carphone Warehouse, IBM, SAS,


write a program in c language to print your bio-data on the screen by using functions.

6 Answers   College School Exams Tests, IBM,






How many types of functions are there in c?

0 Answers  


what is the use of keyword volatile??

4 Answers   LG Soft,


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database

2 Answers   TCS, Unisys, Webyog,


what is c

4 Answers  


the format specified for hexa decimal is a.%d b.%o c.%x d.%u

7 Answers   TCS,


How many types of operator or there in c?

0 Answers  


Explain pointers in c programming?

0 Answers  


Categories