C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies
Views Reverse Sort Order
/*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
402,510
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,958
Background The output to the Matrix multiplication will be generated as follows. a11 a12 a13 A11 A12 A13 a11xA11+a12xA21+a13xA31 a11xA12+a12xA22+a13xA32 a21 a22 a23 x A21 A22 A23 = a21xA11+a22xA21+a23xA31 a21xA12+a22xA22+a23xA32 a31 a32 a33 A31 A32 A33 a31xA11+a32xA21+a33xA31 ...
10
242,564
WHAT IS A UNION A union, is a collection of variables of different types, just like a structure. However, with unions, you can only store information in one field at any one time. You can picture a union as like a chunk of memory that is used to store variables of different types. Once a new...
12
207,334
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
151,010
C program to check whether a year is a leap year or not. /* ** C program to check whether an entered year is a leap year or not ** @author: Pradeep ** @date: 02/12/06 */ #include<stdio.h>
12
132,023
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,105
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
95,864
Program for singly circular linked list which inserts, deletes, searches .... data in it #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> /***** Structure template *****/ struct list{
37
92,769
Insert a node before a particular node in a linked ist node* ins_bef(node *current) { int rno; /* Roll number for inserting a node*/ node *newnode,*temp; newnode=(node*)malloc(sizeof(node)); printf("\nEnter the roll number before which you want to insert a...
2
81,975
Queue implementation using linked list #include <stdio.h> #include <conio.h> #include <stdlib.h> /***** Structure template *****/ struct list{ char data; struct list *next; };
11
80,961
Code for Decimal To Binary Conversion #include<stdio.h> void main() { int i,n1,t,w,a,i1=0; float n,f2; clrscr(); printf("PROGRAM FOR DECIMAL TO BINARY CONVERSION\n");
5
76,300
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,908
The article discusses about all the number formats viz Binary, Decimal, Octal, Hex and BCD (Binary coded decimal) and conversion from Decimal to Binary, Octal and Hex and also the reverse conversion. Binary A numbering system based on 2 in which 0 and 1 are the only available digits. ...
28
71,133
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,134
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,631
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
42,148
C Program to solves linear programming problem or LPP by "SIMPLEX" and "DUAL SIMPLEX" method. The code Simplex Method Code #include <stdio.h> #include <conio.h> #define INFINITY 999 #define N 3
11
40,735
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,455
I recently faced a problem regarding these 2 Escape Sequences. So, I thought I should share the difference between these two to clarify to all who may hay have confusion like me. Thanks to Shabbir too...... The Difference There are a few characters which can indicate a new line. The usual...
6
40,071