Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 108182

C is a general-purpose computer programming language used for operating systems, games, and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.

11 votes
2 answers
6k views

Tic Tac Toe vs PC

| %c | %c\n", xo[2][0], xo[2][1], xo[2][2]); printf("___|___|___ \n"); printf(" | | \n"); printf(" %c | %c | %c\n", xo[1][0], xo[1][1], xo[1][2]); printf("___|___ … |___ \n"); printf(" | | \n"); printf(" %c | %c | %c\n", xo[0][0], xo[0][1], xo[0][2]); printf(" | | \n\n\n"); usleep(1000000); } void Clear_board(char (*xo) …
manish ma's user avatar
  • 335
2 votes
1 answer
74 views

Small database with a user defined size

conn) { die("Memory error conn.", conn); } if(mode == 'c') { conn->file = fopen(filename, "w"); } else { conn->file = fopen(filename, "r+"); … filename = argv[1]; char action = argv[2][0]; connection_t *conn = database_open(filename, action); int id = 0; if(argc > 3) id = atoi(argv[3]); switch(action) { case 'c' …
manish ma's user avatar
  • 335
4 votes
3 answers
15k views

Snake game in C for Linux console

size-1; snake1->head_Y=5; } void snake_place(snake *snake1, snake_pos *pos1) { int i; for (i=0; i<snake1->size; ++i) { gotoxy(snake1->tail_X,snake1->tail_Y); printf("%c" … ,food1->symbol); } void gotoxy(int x,int y) { printf("%c[%d;%df",0x1B,y,x); } void pos_init(snake_pos *pos1) { memset(pos1, 0, sizeof(*pos1)); } int game_over(snake *snake1, snake_pos * …
manish ma's user avatar
  • 335
6 votes
2 answers
934 views

Longest palindrome in an array

I am new to programming, and think this code could be improved upon. Any suggestions? #include <stdio.h> #define size 10 void main() { int i,j,ii,jj,arr[size]={1,2,4,2,1,1,2,1,1,2}; …
manish ma's user avatar
  • 335