Writing a simple c program


#1

Running “/home/ubuntu/workspace/tester”
/home/ubuntu/workspace/tester: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status

Process exited with code: 1

this is my first time using cloud 9 to code and I tried running a simple c program and that’s the message I’ve been getting back every time when i press run . please help

code

#include <stdio.h>

int main()
{	printf("helloworld ");

	return 0;
}

#2

what is the file name? it needs to have .c extension


#3

ok . I just tried it again now with the .c extension and it works :slight_smile::slight_smile: THANKS


#4

i have this problem Anoz … can you say to me what is the c extension.


#5

Hi , when you are saving the file ,go to save as and put a .c at the end of the filename then your problem will be solved . Also just make sure at the bottom right-hand corner under runner you have c(simple) that is what I was using at that time.

I hope that helps :slight_smile: