Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a C program to print the program itself ?!

Answer Posted / swamy

#include<stdio.h>
#include<conio.h>
int main()
{
FILE * fp = NULL;
char c = '\0';
fp = fopen(__FILE__,"r");
while(!feof(fp))
{
c = fgetc(fp);
printf("%c",c);
}
getch();
}

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1186


Explain what math functions are available for integers? For floating point?

1062


What is the heap in c?

1030


What is the difference between volatile and const volatile?

936


What is pointer to pointer in c with example?

982


How can you find the day of the week given the date?

1147


What is c language and why we use it?

1003


What are the modifiers available in c programming language?

1174


Which built-in library function can be used to match a patter from the string?

1236


What is && in c programming?

1111


Explain high-order bytes.

1061


What is the difference between local variable and global variable in c?

1163


How do I read the arrow keys? What about function keys?

1018


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1328


Is exit(status) truly equivalent to returning the same status from main?

1008