C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
Views
Code for Integer Into Words #include<stdio.h> void main() { long int n,t; char a={" ","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"}; char b={" "," ","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"}; char c={"...
1
2,434
Introduction In computer science a search algorithm is a technique of finding a particular item among a collection of items. Searching for data is the second most common activity (after sorting data) necessary for creating many types of programs. Sequential Search In this technique we...
1
3,149
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
3,935
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,514
As the name suggests, volatile specifier indicates the compiler that the value of the variable is volatile i.e. it can change unexpectedly. But, the question comes why do we need to even specify that a variable value is volatile. The Requirement for volatile specifiers Our compilers...
1
2,675
In this article we will extend our code to print more comprehensive information about a file/directory in a directory. Please Refer Developing Linux Utility like 'ls' in C Developing Linux Utility - Part II Arranging Output in Alphabetical Order Example $ ls -l total 148 ...
1
2,276
This program takes the elements from the user in random order & then arranges it in form of Binary Search Tree.It then asks user for traversal #include<stdio.h> // including headerfiles #include<conio.h> #include<stdlib.h> struct tree ...
0
49,899
We all have been using Functions since we stepped into programming. Numerous times we have called a function with some arguments to it. We all know that the basic declaration of a function is : <return-type><function-name>(<comma seperated list of arguments>); For example : int func(int...
0
1,990
If you are an experienced C/C++ programmer then you must have definitely observed some weird behaviors of code in certain situations. These weird behaviors can be due to various reasons but most of them are because of stack corruption. For all those who have no idea about what stack corruption is,...
0
4,173
If you work 3-4 hours daily on coding in C/C++ then there ought to be some programs, logics, tricks, tips etc which you come across daily. Some are new to only you while others are interesting enough to be shared. Here in this article, I am going to share one interesting program and how I went...
0
1,783
The other day I was searching a bit on Linux viruses on Internet. Though there are quite a few now but still cannot be compared with the volumes that we have on windows. Another thing that I found was the permission robustness that Linux file system has as compared to windows OS. So, whiling...
0
3,378
Being a Linux system programmer there are numerous situations when one needs to deal with files kept on disk. Like opening a file, reading a file(one character at a time, one line at a time, the whole file at a time), seeking in a file and then finally closing it. One can use various library...
0
6,516
GCC provides quite a lot of builtin functions. These functions are part of standard C offered by the compiler and may come in various variants as per the gcc. These are also termed as hardware specific functions which are internally implemented in assembly or we can say machine instructions, with...
0
7,523
Pretty sure, one must have used the datatype ‘float’ numerous number of times since the day one has started programming. However, there are many times, when we mishandle floats and doubles, or get unexpected results while using float variables or find ourselves being perplexed while using floating...
0
2,631
Error handling has always been dominantly vital in programming. It has become a bit more sophisticated with the object oriented languages, however even in the system programming language like C, error handling is being offered in its own simple ways. Introduction To swim deep into the...
0
2,695
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
1,415
Array is a data structure consists of a group of elements of same data type. We can think it as collection of variable of similar data type. Array prototype: Data_type array_name Example: Suppose you have a team of 10 employees. Id is given for every employee. You want to store id, age...
0
1,052
Function is a block of statements that performs a specific task. It is reusable portion of the code and a very effective way to modularize your program. For example, you may need to perform different arithmetic operations in your program like addition, subtraction, multiplication and division....
0
1,106
There are many built in data types in C. But sometimes, the built in data types are not enough to perform the required tasks. In that case, some custom data type can be built to meet the necessary requirements. In this tutorial, the following custom data types are going to be discussed: ...
0
1,384
Data files are very essential part of in computer programming. The data we use while programming using the variables of different data types, are unavailable after the program execution. So,there is no way to retrieve the data if we further need. Here comes the necessity of data files. FILE...
0
1,558