C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies
Views
The below code is a calculator in plain C. It does not take into account the operability of bodmas but just one operation at a time. The main thing in the source code below in the scanf which scans the input as number symbol number just as in case of normal calculator. #include<stdio.h> ...
34
129,658
Refer to the recent articles on Understanding File Handling Functions in C & Understanding Advance File Handling Functions in C C communicates with files using a new datatype called a file pointer. This type is defined within stdio.h, and written as FILE *. A file pointer called output_file is...
11
73,183
InFix to PostFix Introduction Infix Expression : Notation in which the operator separates its operands. Eg (a + b) * c. Infix notation requires the use of brackets to specify the order of evaluation. Postfix Expression :
30
96,664
A Program to check whether entered matrix is symmetric or not. #include<stdio.h> #include<conio.h> main() { int a,at,k,i,j,m,n; clrscr(); printf("enter the order of matrix"); scanf("%d %d",&m,&n);
8
21,641
Refer to the recent articles on Understanding File Handling Functions in C & Understanding Advance File Handling Functions in C Opening A File Before we can write information to a file on a disk or read it, we must open the file. Opening a file establishes a link between the program and the...
14
320,713
Hello to one & all, I did a little bit of programming this weekend (I got myself a new Xbox 360!) .... but not satisfied with the Gaming monolith, I decided to do some game programming myself. So, I implemented that very famous game played by everyone who had access to a computer in the early 90's...
8
4,235
Stack memory Let's suppose there is nothing on the stack to begin with. One of the functions either the calling function or the called function depending on the calling convention would start a stack. Lets take a very simple C / C++ program to see how things would work. int func(int i) {...
1
4,224
Introduction After long day's discussion, bool was made as built-in type. Before it lot of other proposals came for bool. There were following proposals. Proposal 1: bool can be implemented by typedef typedef int bool ; It works fine but problem is that if someone overloads functions...
4
3,681
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>
31
9,104
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...
1
3,256
Function pointers are pointers that can hold the address of a particular type of functions. These pointers, once initialized can be used to call the function whose address they are pointing to. Declaring Function Pointer A function pointer can be declared in following way : <return type of...
13
4,752
Signals are the interrupts. They are a way of providing asynchronous events. For example a user typing ctrl-c on terminal to stop a program. Most of the programs need to handle signals. Every signal has a name like SIGxxx. For example : SIGALRM is the alarm signal that is generated when the timer...
1
4,386
We will discuss the concept of Macros. A Macro is a name given to a piece of code or to a value. Whenever the macro is used in the code, it is replaced by its value at the very first stage (preprocessing stage) of compilation process. They are defined using '#define' directive. For...
2
2,501
In this article, we will discuss different implementations of sleep functions that had flaws to understand how sleep function evolved. Before discussing the sleep function implementations, lets first understand briefly the following two functions : alarm() function From Linux Man page : ...
0
2,541
After writing my previous article Virus Code in Linux - C Code That Changes it's Process Name Run Time, I wondered if a process can change its name then why cannot it change its PID. And what if a process can change both its name and PID after lets say every 1 second? Well it will be a difficult...
0
4,319
There are certain situations where you may want to limit your process's use of system resources like CPU or may want to put certain limitations on things like number of open file descriptors, maximum memory your process can allocate for its data etc. You may use commands like ulimit, sysconf etc to...
2
8,984
In this article I'm going to show you how to change value of variable during run time. There are many tools around how to do this easily, but I will focus on the way doing it programatically, specifically using C language. Tools I will use: Cheat Engine 6.0 Here is a simple code for login, I...
7
9,680
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...
0
2,457
I wanted to make a remake of my previous BAD versions of these 2 functions. I think they are working great now, and they're portable the same as the originals from STD library. ATOI /** // By 85 // boyscout_arg@hotmail.com // etalking.com.ar
1
9,643
Loops are the basic logic building structures in computer programming. It is a way of executing statement(s) repeatedly in specified times, which is termed as iteration. Here different types of loops in C language will be discussed. All of them have same goal, but their way of working is...
0
2,510