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.



write a programe to print this string in reverse order and find out how many times letter c is rep..

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

Post New Answer

More Engineering AllOther Interview Questions

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

1 Answers  


i want to know ,If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits.

1 Answers   Microsoft,


to acheve the IP 65 protection class does it is mandatory to apply silicon grease?

1 Answers  


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?

8 Answers   Infosys,


true and false 1. The jawa source code can be created in a notepad editor. 2. The value of 111% 13 is 3.

2 Answers  


When to use Stub and Not So Stubby Area? 10. How to get the external routes without making area Not So Stubby?

1 Answers   Network,


the interviewer ask me If i accept to in lower position than the one i was tested for

2 Answers  


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..?

0 Answers  


How would you design a gravity dam for holding back water?

1 Answers  


is the used fire extinguisher fall under Hazardous waste material?

1 Answers  


How to write C++ files programs?

1 Answers  


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..

7 Answers   Exilant,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)