write a programe to print this string in reverse order and
find out how many times letter c is repeated?
string = { c was desined by dennis ritchie}.
also find out the lenth of the string.
Answer / Mayur Kumar Arya
Here's a C program that reverses the string and counts the occurrences of 'c':
```c
#include <stdio.h>
#include <string.h>
int main() {
char str[] = " c was desined by dennis ritchie";
int len = strlen(str);
int count_c = 0;
for (int i = 0; i < len; ++i) {
if (str[i] == 'c') {
count_c++;
}
}
printf("The length of the string is: %d
", len);
printf("Number of occurrences of letter c: %d
", count_c);
for (int i = len - 1; i >= 0; --i) {
printf("%c", str[i]);
}
printf("n");
return 0;
}
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Hello everybody, I have applied for the AAI jr executive ATC exam. I am from CSE branch. Is Exam paper for the CSE and other branches same or not? Because I don't have knowlwdge on Electronic subject? Can any one please send me the previous exam papers for AAI Jr Executive of CSE branch My id is: naveen.kocherla@gmail.com Thanks and Regards Naveen
i want to know ,If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits.
to acheve the IP 65 protection class does it is mandatory to apply silicon grease?
the game of tic-tac-toe is being played between two players. only the last mark to be placed in the game. who will win the game?
true and false 1. The jawa source code can be created in a notepad editor. 2. The value of 111% 13 is 3.
When to use Stub and Not So Stubby Area? 10. How to get the external routes without making area Not So Stubby?
the interviewer ask me If i accept to in lower position than the one i was tested for
am looking for ms,i got ielts score 5.5,and i dont have english score 60 in any any year.tell me can i get offer lettr from any university.is i am elegible..?
How would you design a gravity dam for holding back water?
is the used fire extinguisher fall under Hazardous waste material?
How to write C++ files programs?
100,1,99,2,98,3...... write a C pgm to generate this series with user input for the number of nos. to b displayed..
Civil Engineering (5086)
Mechanical Engineering (4453)
Electrical Engineering (16638)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)