My first C program! - Raspberry Pi Forums


i had made c program, first 1 actually, , it's on github right now.

here link it: https://github.com/blockmaster1655/c-example-source/

right source-only try it. installation directions available on repository.

hi,

try turning on warnings when compile code. use command line:-

code: select all

gcc -wall c_example.c

code: select all

c_example.c: in function ‘main’: c_example.c:7:1: warning: control reaches end of non-void function [-wreturn-type]  }  ^
warning perhaps little cryptic. functions in c declared void don't return value. non-void function returns value. main function in c program returns integer value. in general return 0 (0) indicate no error has occurred.

code: select all

#include <stdio.h>  int main(void) {     printf("this c program, , it's first 1 too.\n");     printf("in case wanted know, c simple language\n");      return 0; }


raspberrypi



Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support