14 May 2010

Strangers in C

While looking in some books, I found a C code with this meaning:

#include <stdio.h>

int connect_to_server();

int main(void){
connect_to_server() && printf("Connection successed\n");
return 0;

int connect_to_server(){
// do connection staff here
// if connection successed
return 1;

Actually, It is very similar to bash script!
Post a Comment