C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Reverse Sort Order Replies
A simple code of Http-Web-Server in C done by a beginner level programmer. Please suggest if you liked it and lets make it better !! Hows that!!! The Code #include<stdio.h> #include<string.h> #include<arpa/inet.h> #include<netdb.h> #include<sys/types.h> #include<sys/socket.h>
What is a socket? See there are many types of sockets hardware sockets “like electrical sockets” etc. and software “programming sockets” like what i'm going to talk about from now onwards. See , a socket can be thought like any standard way to perform network communication through our system...
Format strings are the strings mainly associated with printf's set of instructions (like printf,fprintf etc..) which basically stands for print format.... These functions accept several arguments and put them on the stack..and as a format specifier is noted in the string the function pops the data...
Continuation of Shell-coding basics..I suggest a glance over it before you start reading this.. Testing We'll be using a simple C program to accomplish our task. test.c // #include<stdio.h> we will not be needing this as we are not using any functions from the C library...Just basic...
Today while solving a problem, I had to convert integers to string in C to use its indexing capabilities. One simple solution was to use sprintf, which can be done in 2-3 lines, but i was temped to solve this problem without any string manipulation functions. The Code // Change a positive...
In this tutorial, we'll be looking at the code structure of the 'echo' utility and will try to understand how it works, for those who are unfamilliar with the 'echo' utility, its one of the most basic and most useful utilities in a shell it prints out its arguments on the standard output, if you...
I am doing C programming from a couple of years ago and finally I convinced myself and grabbed all my guts to write an article on Pointers. Now, one could easily question Why? Basically, Pointers are the most useful part of C and usually the most difficult to understand. Note: I don't want to...
In this article we'll be learning how we can improve our C code by using Macros instead of functions. How simple functions can be converted into macros to save on some CPU instructions. Some basic knowledge of C and a little bit Assembly is considered as pre-requisites. The Code We'll be...
What is a Compiler A Compiler is a Computer Program that go through the provided source code , Checks for error and converts in into another computer language that a computer can understand (usually binary opcodes). Compilation A compiler's work can be divided into 3 parts. Front End...
In this tutorial we’ll be making our first running C Program, It will simply print out a Message on the Screen! So let the coding begin. :party: hello.c #include<stdio.h> int main() { printf("Hello World! This is my first C Program "); return(0); }
In this tutorial we’ll be learning some mathematical operations in C (multiplications, divisions , additions , subtractions , modulus) So let’s get started Almost all mathematical operations in C follow the following syntax :- … The ‘…’ indicates that any number of terms (>2) can be...
In this tutorial we’ll be learning about LOGICAL operators in C , What are they and How they can be used. These are also a fundamental part of C programming Language, and You’ll find them in almost every useful code using conditions. Note : C Generally denotes 1 for True and 0 for False. (While...
Looping While writing our C programs we might feel a need to execute similar or same set of instructions multiple times , for eg: Printing numbers from 1 to 100 on the screen , This task without the use of looping could be very tedious and make would make the code absolutely not redistributable...
The while loop is a statement used in some programming languages (including C) to execute code repeatedly, this allows a programmer to execute a set of instruction multiple times until a condition is met. It is one of the simplest looping structure in C and basically follows the following...
Do while loops Do while loops are special kind of loops that are used to execute statements repeatedly in some programming languages including C. The do while loop is quite similar to the while loop but the main special thing about Do While loops are that they evaluate conditions at the bottom...
For Loops ‘For loops’ are more concise and special kind of loops that are used to execute statements repeatedly in some programming languages including C. The For loop structure is quite different from while loops as well as do while loop structures which we had a look in previous articles. ...
Break and Continue are two special kind of statements used in some programming languages including C , they are used in some special conditions when the programmer needs an early exit from the loop or continuation with the next iteration. Break The Break statement is used to terminate any...
Switch Case Statements are special type of Conditional Statements (Selection Control Mechanism) , Basically they are used as a alternative for the long if statements used to compare integral values , By integral values we mean the values that can be expressed as an integer eg :- Characters ,...
What is a Function? A Function is a statement or a rule which relates a variable quantity with other variable quantities. The function can often be related to a machine , it has an input and a output , The output is somehow dependent on the input. For more clarity lets take an example of a...
In the previous tutorial we talked about functions, What are they, How to declare them etc. Now in this article we’ll be looking at In this tutorial we’ll be looking at a basic sample program, how it works and some basic rules/tips to keep in mind. Simple Program using Functions Function.c...