This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This program is solve using for loop. */ | |
#include <stdio.h> | |
#include <math.h> | |
int main() | |
{ | |
int n, count, sum = 0; | |
printf("Enter an integer: "); | |
scanf("%d", &n); | |
for (count = 1; count <= n; ++count) /* for loop terminates if count>n */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** ghbn.c -- a hostname lookup demo | |
** | |
** THIS IS A DEPRECATED METHOD OF GETTING HOST NAMES | |
** use getaddrinfo() instead. | |
*/ | |
#include <stdio.h> | |
#include <errno.h> | |
#include <netdb.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** showip.c -- show IP addresses for a host given on the command line | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* hello-world-server.c - a "hello world" server */ | |
#include <stdio.h> /* Basic I/O routines */ | |
#include <sys/types.h> /* standard system types */ | |
#include <netinet/in.h> /* Internet address structures */ | |
#include <sys/socket.h> /* socket interface functions */ | |
#include <netdb.h> /* host to IP resolution */ | |
#define PORT 5050 /* port of "hello world" server */ | |
#define LINE "hello world" /* what to say to our clients */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************\ | |
MODULE NAME: b64.c | |
AUTHOR: Bob Trower 08/04/01 | |
PROJECT: Crypt Data Packaging | |
COPYRIGHT: Copyright (c) Trantor Standard Systems Inc., 2001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main( int argc, char *argv[] ) | |
{ | |
if ( argc != 3 ) /* argc should be 2 for correct execution */ | |
{ | |
/* We print argv[0] assuming it is the program name */ | |
printf( "usage: [%s][N bytes][file name]", argv[0] ); | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void printchar(char c[128], int n) | |
{ | |
int i; | |
for(i=0;i<n;i++) | |
{ | |
printf("%s", c); | |
} | |
printf("\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/sdcard/Download/M0ori-1.jpg | |
from pil import Image | |
im = Image.open("/sdcard/Download/M0ori-1.jpg") | |
im.save("/sdcard/Download/M0ori-1.bmp", "bmp") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main( int argc, char *argv[] ) | |
{ | |
if ( argc != 3 ) /* argc should be 2 for correct execution */ | |
{ | |
/* We print argv[0] assuming it is the program name */ | |
printf( "usage: [%s][N bytes][file name]", argv[0] ); | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// webserver.c | |
// | |
// Simple HTTP server sample for sanos | |
// | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> | |
#include <sys/stat.h> |