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 / joyab

#include <stdio.h>

int main()
{
char a[] = "int main(){char a[] = %c%s%c; char b = '%c'; printf(a,b,a,b,b);}";
char b = '"';

printf(a,b,a,b,b);
}

Is This Answer Correct ?    9 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define recursion in c.

1274


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1087


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1106


How can you read a directory in a C program?

1139


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1087


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

1080


Explain what is a static function?

1101


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1064


we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

1146


What are the complete rules for header file searching?

1073


What is the purpose of ftell?

1074


Distinguish between actual and formal arguments.

1073


Explain what is a 'locale'?

1076


Is null a keyword in c?

1193


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1061