I transferred a test c program from text editor to Linux virtual box which has l
ID: 3603161 • Letter: I
Question
I transferred a test c program from text editor to Linux virtual box which has linux window and c compiler and my tutor run a program from this Linux c compiler. Now I can’t run this test program that I made in text editor with correct code from chegg and transferred to Linux. Even though it is in Linux window of osc9e-src, actually I need the exact command only to run it and I don’t know any command to run it. Could you please tell me exactly what I should type for running this program in Linux by all needed steps for this program and whose code I can see in Linux C window. I transferred a test c program from text editor to Linux virtual box which has linux window and c compiler and my tutor run a program from this Linux c compiler. Now I can’t run this test program that I made in text editor with correct code from chegg and transferred to Linux. Even though it is in Linux window of osc9e-src, actually I need the exact command only to run it and I don’t know any command to run it. Could you please tell me exactly what I should type for running this program in Linux by all needed steps for this program and whose code I can see in Linux C window.Explanation / Answer
/* program 6-2.cpp */
#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
int ch;
ch = getchar(); /* read a character */
printf("You typed: %c",ch);
printf(" which corresponds to the ASCII: %d",ch);
getch();
}