C Programming Tutorials

C Programming Tutorials And Articles
  Title Reverse Sort Order / Author Replies
Views
Pointer Pointer is a declared like a variable, but it's not an ordinary variable, it's a fancy variable, that can store address of the another variable. Pointer is very much useful for allocating memory at run time , that's dynamic allocation. Pointers are said to "point to" the variable whose...
5
2,867
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,612
Port scanner in C #include<stdio.h> #include<sys/socket.h> #include<sys/types.h> #include<stdlib.h> #include<netdb.h> int main(int argc,char **argv) { int i,err,net; struct hostent *host;
3
12,262
Introduction This article talks about some general tips while using pointers in an Application. Background While working with different kinds of errors, generally detecting an error is easier than fixing it. When it comes to pointer, the error is usually the result of a pointer pointing...
6
5,872
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,966
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,038
Program tells you the day of the date inputed. Remember when you copy the code paste in a file named *.c and not cpp file as that will cause an error. I have commented in the code where it will cause the error. #include<stdio.h> #include<conio.h> #include<time.h> #define AND && #define OR...
2
4,517
If you are a developer then you would definitely be aware of the concept of temporary files. Temporary files, as the name suggest is temporary in its persistence. Either a process creates a temporary file to hold data for certain time or to pass information to another process. An ideal process...
0
2,018
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,762
I am attaching a ZIP file that contains a Quiz Making and Participating program. You MUST donwload the ZIP and run the exe. The source code given below would not be sufficient enough. As of Right now, only the participating side is completed - Files are created for individual teams and all their...
4
4,531
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
3,103
There are times when you write a small or a big code and when you execute it you get a very small and precise output 'Segmentation fault'. In a small piece of code its still easy to debug the reason for this but as the code size grows it becomes very difficult to debug. Here in this article, I am...
8
15,393
Introduction In this i have made use of recursion to calculate x to the power n #include <stdio.h> main() {
7
31,909
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,621
Listed here are few common complex operations of single linked list that is to be needed by certain applications. These operations should be done in single traversal for improved performance. Here are few of them and their solutions.. 1. Reverse the list. 2. Find n-th node from tail end....
7
19,297
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,059
Today we will discuss about Sockets programming paradigm, elements of Sockets applications, and the Sockets API. The Sockets API allows to develop applications that communicate over a network. The network can be a local private network or the public Internet. An important item about Sockets...
7
31,870
What is a socket? See there are many types of sockets hardware sockets “like electrical sockets” etc. and software “programming sockets” like what i'm going to talk about from now onwards. See , a socket can be thought like any standard way to perform network communication through our system...
11
5,046
There are a certain functions in C, which if used in a particular combination may cause problems. These problems are due to the conflicting behaviors of the functions. In this article, we will understand the problem caused by using one such combination of functions scanf() and fgets()/gets(). ...
5
5,919
Stack is a LIFO abstract type of data structure. The stack is mainly associated with 2 types of functions Push() and Pop(). Push() adds an item on the top of the stack and Pop() removes an item from the top of the stack. Implementation of Stack stack.c #include<stdio.h> #include<string.h>...
1
9,173