C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
Views
Introduction Here I am going to give a simple example of addition, substraction, multiplication etc to check overflow/underflow so that we can minimize buggs/defects in our code The code In your project/product or any place, If you have some operation like Addition, substraction...
4
4,230
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,196
Newton Raphson Interpolation Formula implementation in C. #include <stdio.h> #include <conio.h> #define N 100 float comb(float,int); /*****************************************************************/ /***** Newton-raphson-interpolation formula implementation *****/ /***** This...
4
9,715
Abstract Introduction PC-Lint tool VivaMP tool Static analysis implemented in Intel C++ compiler Conclusion References Abstract
4
2,644
Introduction This article is about the slicing of object while sending the argument through a pass by value mechanism when using polymorphism. Background While we are using passing by address mechanism the address of the base class type as well as the derived class type are same in...
4
6,678
Abstract Introduction size_t type ptrdiff_t type Portability of size_t and ptrdiff_t Safety of ptrdiff_t and size_t types in address arithmetic Performance of code using ptrdiff_t and size_t Code refactoring with the purpose of moving to ptrdiff_t and size_t References
4
3,675
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...
4
4,681
One of the tricky question in interview comes out is How do you point to the third byte of an integer. Assumption that integer is 4 byte. Here is the code to do the same #include <iostream> using namespace std; int main(int argc, char *argv) { int i = 35; //integer...
3
4,519
Comma-separated expressions were inherited from C. It's likely that you use such expressions in for- and while-loops rather often. Yet, the language rules in this regard are far from being intuitive. First, let's see what a comma separated expression is. An expression may consist of one or...
3
7,078
C implementation of double linked list #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define N 100 struct dlinklist {
3
48,188
To check whether entered number is armstrong number or not. #include<stdio.h> #include<conio.h> #include<math.h> main() { int n,sum=0,rem=0,cube=0,n1,i; clrscr(); printf("enter a number");
3
20,643
As the topic says, self printing programs are nothing but they reproduce themselves as output. Such programs are referred as Quines from the name of the logician Willard van Orman Quine who introduced the concept. I said an 'Ah!!!' when I heard about Quines for first time, spent more hours to...
3
7,351
The other day, I just had this thought of exhausting the R.A.M. of my ailing, old P.C. in the hopes that it may trigger off a cataclysmic crash which would render it useless :happy: (so that I finally get that brand new mega-system P.C. which I so yearn! :D ) So I set out to write this program...
3
2,906
I wrote a program in C for matching patterns among 2D matrices. In brief, the program accepts a SUBSET matrix & a SUPERSET matrix as I/P from user and helps verify whether the SUBSET matrix is present within the SUPERSET matrix in a continuous manner (provisions have been made for detecting row...
3
8,409
Introduction A lot of us use TC in our colleges. Today I will share with you Two ways to have fun in lab with your teachers. ;) Background Trick I In the first way, you will create an error in any wokring code just by adding one or more numeric letter in it. There will be only one...
3
2,648
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
4,768
Integers is a fundamental data type in a C program, They are used to represent a finite subset of mathematical integers, C Provides us with a suite of functions, and quite a lot of modifiers for manipulating these integers , but if these functions and modifiers are not used properly and carefully...
3
4,654
Using URLDownloadToFile function In this article I would want to show you how to download a file from internet using URLDownloadToFile function in C language. I think everybody has ever experienced the downloading a file with Internet Explorer. IE is using directly this function, but It uses...
3
4,268
Strings are paramount datatype for any real use case scenario. However, in C, there is no basic datatype as ‘string’. A string is understood as a collection set of characters i.e. in programmatic language, an array of characters, which are: Directly assigned in double quotes Terminated by a...
3
3,056
When an ELF executable is executed, a process is created and its process image is create in the RAM. However, it is here in the process image in RAM, all the variables are assigned memory. Sometimes memory is allocated statically i.e. defined how much memory at the compile time, and at times it has...
3
2,891