Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  1. saad90

    Need help to fix bug in tic tac toe game

    I can't find the bug . I watched the video on 'bro code' youtube channel. Someone help in finding the bug. e #include<stdio.h> #include <stdlib.h> #include <time.h> #include <ctype.h> char board[3][3]; const char PLAYER='X'; const char COMPUTER='O'; void resetBoard(); void printBoard(); void...
  2. B

    C Struggling to get string and then accept other types of input

    Hey there, it's been a long time since I've asked a question on this site! I've started building my library management project, however, I have ran into a problem involving scanning string input. Data for new books is saved to a structure: book name and author(both strings), year published and...
  3. Chillzy

    Why does this cause a seg fault?

    According to my IDE (CodeBlocks), this bit of code causes a seg fault. I'm trying to fix this but I don't even know why this causes a seg fault so an explanation would be helpful. ``` unsigned char* pixel_offset = data + (j + width * i) * byte_per_pixel; unsigned char y...
  4. Fast

    C Rand in C

    Hi, i'm a newbie and my teacher gave me an exercis with strings and arrays where i had to lowercase, uppercase ecc a string. Now i'm stuck with my code where i have to replace a random letter of the string with a random letter without using any library that simplify the problem. That's the code...
  5. bigBelly

    Find the next max number from an array using greedy method

    I am new to programming and I have to do a little program that has an array of n elements and i have to find the largest 4 numbers and to calculate the sum of them. Sorry if i didn t used the code function very good, but on phone i have some issues with the editor. Thanks for your help! As an...
  6. B

    xv6 - A recreation of the sixth version of UNIX

    Hello there, I introduce to you all: Xv6, a recreation of the sixth version of the original UNIX operating-system, written purely in C(just like UNIX). The operating-system was created purely for educational purposes at MIT and is much simpler for analysis than a Linux or BSD kernel. The...
  7. B

    Useless Simulation Project

    Introduction Hello there, Not too long ago, I began working on a simulation project as a way to sharpen my C programming skills. I wasn't happy with it, so I restarted it. As of today, I'm finally giving it away as I no longer want to work on the project, but, I do not want to dispose of it...
  8. Kaworu

    My char gets changed for apparently no reason

    Hi! I'm trying to learn pure C. I made a simple program with definitions of various variables there can be. Everything seems okay, but my char definied as "W" shows in the program as "h". I do not know why it is like that. Any help would be greatly appreciated. The program: My execution of...
  9. M

    C The C Tutorial Series - Tutorial 1: Printing, Variables And Data-Tyes, And Comments

    Introduction Welcome to the first tutorial in the C Tutorial Series, here on CF. In today's tutorial, we will be covering the following things: Printing out text Variables and their different data-types(char, int, float, and double) Commenting your code These are the prime basics that you will...
  10. M

    The C Tutorial Series

    Introduction Hey there, readers. I'd like to introduce you to the C Tutorial Series - A series in which I'll be teaching you the syntax of C and the concepts of the language and procedural-programming. You'll learn many new things in this series that can be transferred over to other languages...
  11. M

    K&R Completed Examples

    If you happen to be struggling with the exercises and code-samples given to you in The C Programming Language by Brian W. Kernighan and Dennis Ritchie(K&R), then feel free to visit this GitHub repository: https://github.com/caisah/K-and-R-exercises-and-examples It provides all of the solutions...
  12. M

    Tutorial An Explanation Of C

    What Is C? Invented at AT&T Bell Labs(Now 'Nokia Bell Labs') in 1972 by Dennis Ritchie(Deceased since 2011). Unlike many other Languages, C is a Procedural-Language. So, there are no such thing as Classes or Inheritance or Generics. C is purely based on Functions, If-Else Statements, Loops and...
  13. D

    Tutorial Simple Guessing Game In C[TUTORIAL]

    Hey everyone. Welcome to this C-Programming Tutorial. In today's Tutorial, I'm going to be showing you how to make a simple Guessing Game in C. Let's begin. First of all, choose where you want to store your Files. Is it in your Documents Directory, a separate Hard-Drive, choose where it will...
  14. D

    Tutorial Compiling A C Program[ LINUX ]

    So, you're starting off in the C Programming-Language. Once a popular Language that is still used but just less used than C++. Well, if you are learning C and you want to know how to Compile your Programs then you've come to the right place. NOTE: This is a Tutorial for Linux-Systems. It has...
  15. D

    Simple Number Guessing Program

    #include <stdio.h> int main(void) { int usr_num = 0; // The Number that the User inserts int app_num = 56; // The Number that the Program is thinking of // Welcome Message printf("Hey. I'm thinking of a Number. Try and guess it and I'll tell you if you're right: "); //...
Back
Top Bottom