C Programming Tutorials

C Programming Tutorials And Articles
  Title Reverse Sort Order / Author Replies
Views
/*question number 1*/ int z,x=5,y=-10,a=4,b=2; z = x++ - --y * b / a;What number will z in the sample code above contain? Choice 1 5 Choice 2 6 Choice 3 10 Corrected by buddy by running the program Choice 4
153
401,971
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
9,034
Introduction Definition: Pointer is a variable which stores address of another variable. To understand this definition properly, let us separate it into two statements: 1. Pointer is a variable. 2. It stores address of another variable. Consider the first statement, it means that a...
8
10,215
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
8,640
Many of us know that both C and C++ do padding when allocating memory for structure. But only few know that why the complier does it. In short, for the efficient access of the memory for OS, padding is required. In long words, the instruction can be fetched/written one machine word at a time....
8
19,539
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
4,094
Progarm for addition,transpose and multiplication of array #include<stdio.h> #include<conio.h> void main() { int a,i,k,j,c1,c2,r1,r2; int m1,m2,m3; clrscr();
5
26,127
Introduction I always like smilies and the ASCII characters can behave like good smileys and so I wrote a small utility to get all tha ASCII values of the characters and I can easily add them anywhere I prefer The Code int i; FILE *fp; fp = fopen("c:\\code.txt","w"); for(i=0;i<256;i++)
2
3,442
In computer programming, a bitwise operation operates on one or two bit patterns or binary numerals at the level of their individual bits. On many computers, bitwise operations are slightly faster than addition and subtraction operations and significantly faster than multiplication and division...
2
15,095
The C Progrmming Language Standard In 1983, the American National Standards Institute (ANSI) commissioned a committee, X3J11, to standardize the C language. After a long, arduous process, including several widespread public reviews, the committee's work was finally ratified as ANS X3.159-1989...
1
22,716
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
21,038
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,475
I thought of sharing the code snippet. It just does the basic operations like inserting a node at the end of the linked list and deletion of any particular node in the linked list. The deletion of a node in linked list is based on the data of the node and not on the index at which data is located....
5
40,428
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,143
The article explains why hashing have o(1) complexity. This article will clear your doubt that whay hashing has 0(1) time complexity but will not take you deeper . There are certain factors which can affect the time complexity like collision and performance of hashing depends on hashing algorithm....
3
6,133
For a given problem, there maybe many solutions, but we always look for a ‘better’ solution. So, how do we determine which solution is ‘better’? In the context of algorithms and programs, we consider a solution as ‘better’ when it uses the minimum resources. Hence, an efficient program will always...
0
3,660
#define f(a,b,c,d) (a>b?(a>c?(a>d?a:d):(c>d?c:d)):(b>c?(b>d?b:d):(c>d?c:d))) #include<stdio.h> #include<conio.h> void main() { int a, b, c, d, k; clrscr(); printf("Enter the value of a, b, c, d\n");
10
3,285
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
50,116
The phenomenon of stuffing excessive data which is beyond the capacity of the allocated memory is known as buffer overflow. In Simple words we can say that for lets say 'n' bytes of memory, if we try to store any number of values which is greater than 'n', then the values beyond the nth value will...
9
3,041
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
9,168