C Programming Tutorials

C Programming Tutorials And Articles
  Title Reverse Sort Order / Author Replies
Views
Introduction This article talks about different ways of handling Abnormal Condtions or Errors that occur or Invalid Data receiving by an Application. These Errors are something, the programmer expect to occur in their Applications. Depending on the specific circumstances, below are some...
3
5,373
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,268
Mostly people are using this algorithm to compute matrix multiplication: #define n 1000 int main() { int a,b,c; c=0; for( i=0;i<n;++i) {
8
28,512
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
72,873
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
318,760
File Splitter is a very useful utility application for downloading . User want to download and store the downloaded files into Floppy disk , Its possible only if the downloaded file size is Less than or equal to 1.38 MB , If file size is more than the floppy disk size then File Splitter is...
2
11,734
A friend of mine who is learning to program in C, was having diffculty in writing a program to find the sum of all the prime numbers between a specified limit (in her case 3-60). I helped her out with the program, and I thought I'll post it here which might help others. /* ** Program to...
20
41,956
The code to find upper and lower diagonal of 3x3 matrices #include<conio.h> #include<stdio.h> void main() { int a,i,j,k; clrscr(); printf("\n Enter a Matrix 3x3:\n\n");
2
4,085
Two of my friends faced a problem with writing a program which finds the LCM(Lowest Common Multiple)/GCD(Greatest Common Divisor) of two positive integers, so I helped them out by writing two functions for each. I thought many others might be having the same problem. So here are the functions:...
54
150,972
This time I want to speak on the 'printf' function. Everybody has heard of software vulnerabilities and that functions like 'printf' are outlaw. But it's one thing to know that you'd better not use these functions, and quite the other to understand why. In this article, I will describe two classic...
4
5,740
==================== .FRIENDSHIP CALCULATOR. ==================== #include<stdio.h> #include<string.h> #include<conio.h> main() { clrscr();
5
27,934
After writing Why main() should not have void as return type? article the other day, suddenly one more question came up into my mind about the signature of main() function. In the earlier article I discussed about why 'void main()' should not be used when ANSI C expects the function main() to...
1
2,688
Introduction On 4th August, shabbir posted this question : (at the $1 Daily contest thread) List a set of prime numbers where the sum total of the complete set is 100. So, I thought why not generate try generating *all* such sets of primes, instead of *any* such set ? And, I sat down to...
5
3,323
Dev-Cpp is an application which is used to code and run programs in C/C++. It has its variations but none of them come with a pre-installed graphics library. So if you are switching from some primitive editor like TurboC to Dev-Cpp (which follows ANSI specifications correctly) and try to write the...
9
8,934
A lot many times you would have used a Linux command with some arguments to it. Like : cp -r /home/user/Desktop/abc /home/abcrm -rf abcIn the above examples, 'cp' or 'rm' are the name of binaries (written in 'C') while the rest of the stuff is the command line arguments to the respective...
2
4,893
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,173
This article is the Part-II (Part-I here) of the series where in we are focusing on good coding practices. In the Part-I we discussed the importance of the assert macro/function for detecting and debugging bugs in program. In this part we will focus on good coding practices while dealing with...
2
2,673
What are Hash Tables? Hash table is a data structure to store key value pairs for all situations. So it is like a table with each entry has a key and a value corresponding to it. So, it is an efficient way of mapping and accessing data. An abstract illustration of hash table: -> Data...
0
5,346
Most of the newbie programmers are fascinated by the term 'hacking' or 'cracking'(to be precise). Generally, they see some weirdly written code (that may visually seem like a painting to any new programmer) and start dreaming of the developer who has written the code as god of programming or...
6
4,153
Processes are the primitive units for alocation of system resources...Each process have their own address space and usually one thread of control. The process which makes another process is called the parent and the process which it makes is called a child process..As we know every process have its...
14
8,896