C

From Oracle FAQ

Jump to: navigation, search

C is a general-purpose, procedural computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. It has since spread to many other platforms. Although predominantly used for system software, C is also widely used for applications - including most of Oracle Corporation's software.

Contents

C and Oracle

To embed SQL and PL/SQL statements into a C-program, use the Pro*C precompiler.

Example C program

Type into file, say hello.c:

#include <stdio.h>

int main() {
  printf("Hello world!\n");
  return(0);
}

Compiling C-programs

The compilation procedure depends on the compiler used. Here is an example when using the GCC compiler on Unix or Linux:

$ gcc hello.c -o hello.exe

Running C-programs

To run the above program:

$ ./hello.exe

External links

Personal tools