. Write a program to get a string and to convert the 1st
letter of it to uppercase
Answer Posted / 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 View All Answers
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
What is indirection? How many levels of pointers can you have?
How does free() know explain how much memory to release?
What is the scope of an external variable in c?
Explain what is the benefit of using const for declaring constants?
What is operator precedence?
How do you sort filenames in a directory?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
What is extern storage class in c?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
Why do we use main function?
What is the use of printf() and scanf() functions?
Explain how can you avoid including a header more than once?