C Programs Archive

Free Ethical Hacking Workshop For All:- Fulfill Elegibility Criteria

Hey guys, http://learnhacking.in is back with another “Free Ethical Hacking for all”. As our Facebook Fans are very well aware of this event. This is our Fourth Workshop. This time we wanted to make it really big so we are taking it From our ...Read More

File Embedder in C

Some times it is necessary for our compiled project to have it’s supporting files embedded within the EXE module itself so that the supporting files may not be put into a seperate folder and carried along with the project. So here I am presenting ...Read More

C Program without main function

How to write a C program without a main function?. Is it possible to do that. Yes there can be a C program without a main function. Here’s the code of the program without a main function… #include<stdio.h> #define decode(s,t,u,m,p,e,d) m##s##u##t #define begin decode(a,n,i,m,a,t,e) ...Read More

Guessing game in C

This is a small guessing game written in C. In this guessing game you have to guess a number between 0 & 100. You have 8 chances to do that. Every time you guess wrongly the program will give you a hint that your ...Read More

Self Destructing program in C

This program will destroy itself upon execution. The program will cause the .exe file to be deleted upon execution. That is this program is capable of destroying itself upon execution. Here is the code #include<stdio.h> #include<conio.h> #include<dos.h> void main() { printf(“This program will destroy ...Read More

C Program to get Current Time

This program reads the current system time and displays it in the form HH:MM:SS #include <stdio.h> #include <dos.h> int main(void) { struct time t; gettime(&t); printf(“The current time is: %2d:%02d:%02d\n”, t.ti_hour, t.ti_min, t.ti_sec); return 0; } People who read this also read:No Related Posts ...Read More

C Program to display current date

This program will get or read the current system date from the system. It displays Year, Month and Day. #include <dos.h> #include <stdio.h> int main(void) { struct date d; getdate(&d); printf(“The current year is: %d\n”, d.da_year); printf(“The current day is: %d\n”, d.da_day); printf(“The current ...Read More

C Program to Set / Change current system date

This program can be used to set or change the system time #include <stdio.h> #include <dos.h> int main(void) { struct time t; gettime(&t); printf(“The current hour is: %d\n”, t.ti_hour); printf(“The current min is: %d\n”, t.ti_min); printf(“The current second is: %d\n”, t.ti_sec); /* Add one ...Read More

C Program to accept a password

This is a simple login program in C. While accepting password it masks each character using ‘*’ symbol and display the password in the next line after the user hits Enter key. It also accepts backspaces and acts accordingly. #include<stdio.h> #include<conio.h> char pw[25],ch; int ...Read More