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

What is a union?

1089


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

1099


What is static memory allocation?

1240


Explain what is the difference between a string and an array?

1223


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1102


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1192


What is strcmp in c?

1213


How many bytes are occupied by near, far and huge pointers (dos)?

1216


What does s c mean on snapchat?

1186


Explain what is output redirection?

1246


What are the rules for the identifier?

1217


What is difference between constant pointer and constant variable?

1399


Which is more efficient, a switch statement or an if else chain?

1079


How can you return multiple values from a function?

1164


What is assert and when would I use it?

1063