This website completely moved to new domain. For latest content, visit www.programmingposts.com
Search This Blog
14 Apr 2013
C PROGRAM TO PRINT SOURCE PROGRAM NAME
#include<stdio.h>main(int argc,char*argv[]){char*p=argv[0];printf("\n *** C PROGRAMS BLOG ***");printf("\n >>> C PROGRAM TO PRINT NAME OF SOURCE PROGRAM <<< \n");printf("\n Program name is : %s",p);
getch();}
This was a nice post. This sort of post will encourage students to learn C
ReplyDeleteThanx
from
www.bunksallowed.blogspot.in
This comment has been removed by the author.
ReplyDelete*** C program to display its own source code ***
ReplyDelete#include
int main()
{
FILE *p;
char c;
p = fopen(__FILE__,"r");
do
{
c = getc(p);
putchar(c);
}
while(c != EOF);
fclose(p);
return 0;
}
Source : http://goo.gl/HZxV6y
Good
ReplyDeleteHere is a link for C/C++ programs and pointer programs. This may be useful for you.
C/C++ Programs
thank you for sharing useful article
ReplyDeleteweb programming tutorial
welookups
helpful for beginners.........
ReplyDeleteStrings in C with examples
Switch Case in C examples
Functions in C, examples
Number Series in C examples