/* Display The current Time in c language*/
/*This program list all files present in a directory/folder in which this executable file is present. For example if this executable file is present in C:\\TC\\BIN then it will lists all the files present in C:\\TC\\BIN.*/
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
struct date d;
getdate(&d);
printf("Current system date is %d/%d/%d",d.da_day,d.da_mon,d.da_year);
getch();
#include<conio.h>
#include<dos.h>
void main()
{
struct date d;
getdate(&d);
printf("Current system date is %d/%d/%d",d.da_day,d.da_mon,d.da_year);
getch();
}
/*This program list all files present in a directory/folder in which this executable file is present. For example if this executable file is present in C:\\TC\\BIN then it will lists all the files present in C:\\TC\\BIN.*/
#include<stdio.h>
#include<conio.h>
#include<dir.h>
void main()
{
int done;
struct ffblk a;
#include<conio.h>
#include<dir.h>
void main()
{
int done;
struct ffblk a;
printf("Press any key to view the files in the current directory\n");
getch();
done = findfirst("*.*",&a,0);
while(!done)
{
printf("%s\n",a.ff_name);
done = findnext(&a);
}
getch();
}
getch();
done = findfirst("*.*",&a,0);
while(!done)
{
printf("%s\n",a.ff_name);
done = findnext(&a);
}
getch();
}
/* Open the notepad using c program/*
#include<stdlib.h>
void main()
{
system("C:\\Windows\\System32\\notepad.exe");
}
Note: When run this program on Turboc++ compiler, it will not open.
Find the instraction:
Save The program->Compile the program -> Click the prog.exe(Manual)
/* Display the ip address using c program/*
void main()
{
system("C:\\Windows\\System32\\notepad.exe");
}
Note: When run this program on Turboc++ compiler, it will not open.
Find the instraction:
Save The program->Compile the program -> Click the prog.exe(Manual)
/* Display the ip address using c program/*
#include<stdlib.h>
void main()
{
system("C:\\Windows\\System32\\ipconfig.exe");
}
Note: When run this program on Turboc++ compiler,it will not display.
Find the instraction:
Save The program->Compile the program -> Click the prog.exe(Manual)
void main()
{
system("C:\\Windows\\System32\\ipconfig.exe");
}
Note: When run this program on Turboc++ compiler,it will not display.
Find the instraction:
Save The program->Compile the program -> Click the prog.exe(Manual)
Post a Comment for more information or more programs......
Dilip Sir TUSI GREAT HO
ReplyDelete