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 file was derived from the 'Hello World!' example recipe in the | |
# Yocto Project Development Manual. | |
# | |
SUMMARY = "Simple Library on Yocto" | |
SECTION = "examples" | |
LICENSE = "MIT" | |
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
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> | |
#include <stdlib.h> | |
struct node { | |
int key; | |
int data; | |
struct node *next; | |
}; | |
struct node *head = NULL; |
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
Show hidden characters
{ | |
"rules": { | |
"align": false, | |
"ban": [], | |
"class-name": false, | |
"comment-format": [ false, "check-space" ], | |
"curly": false, | |
"eofline": false, | |
"forin": false, | |
"indent": [ false, "tabs" ], |
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
void reverse(char *str) | |
{ | |
char *end = str; | |
char tmp; | |
if (str) { | |
while (*end) end++; | |
end--; | |
while (str < end) { | |
/* swap the character */ | |
tmp = *end; |
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
socket_server() | |
{ | |
int sockfd, newsockfd, portno; | |
struct sockaddr_in serv_addr, cli_addr; | |
socklen_t addrlen; | |
int pid; | |
/* First call to socket() function */ | |
sockfd = socket(AF_INET, SOCK_STREAM, 0); |
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(void) | |
{ | |
int a[] = {3, 6, 9, -8, 1}; | |
int i, j; | |
int n; | |
/* find the number of array */ | |
n = sizeof(a) / sizeof(a[0]); | |
for (i=0; i<n; i++) { |