I want to write a program that get a program in Pascal language and convert it to a C language program.
the input program will get in character type and just include some statements such as (read , write,begin ,var,if,case sellector,...).
in fact I like you to guide me that how in C language we can get a text in char type and change or replace some of it's data and print it again.
the above reads one line of character string. then you should modify, as you wish by accessing the elements (like str), and finally display:
cout << str;
However this is not the only thing you should do. Converting a pascal program to C program is more complicated, as you need to somehow understand the structure of pascal code, inside your program (parsing).