#include <stdio.h>
#include <string.h>
int main()
{
char s[40] = "C Prg Test",
char r[100];
int n, c, d,
n = strlen(s);
for (c=n-1, d = 0; c>=0; C--, d++)
r[d] = S[C]
r[d] = '\0'
printf("%s", r),
return 0
Answers
Answer:
compiler.cpp:14:1: error: stray '\342' in program
14 |
| ^
compiler.cpp:14:2: error: stray '\200' in program
14 |
| ^
compiler.cpp:14:3: error: stray '\213' in program
14 |
| ^
compiler.cpp: In function 'int main()':
compiler.cpp:6:1: error: expected unqualified-id before 'char'
6 | char r[100];
| ^~~~
compiler.cpp:8:1: error: redeclaration of 'int n'
8 | n = strlen(s);
| ^
compiler.cpp:7:5: note: 'int n' previously declared here
7 | int n, c, d,
| ^
compiler.cpp:9:26: error: 'C' was not declared in this scope
9 | for (c=n-1, d = 0; c>=0; C--, d++)
| ^
compiler.cpp:10:1: error: 'r' was not declared in this scope
10 | r[d] = S[C]
| ^
compiler.cpp:10:8: error: 'S' was not declared in this scope
10 | r[d] = S[C]
| ^
compiler.cpp:13:8: error: expected '}' at end of input
13 | return 0
| ^
compiler.cpp:4:1: note: to match this '{'
4 | {
| ^