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
Explain what is meant by 'bit masking'?
What are the c keywords?
Why enum is used in c?
Explain how do you sort filenames in a directory?
What does c mean in basketball?
Is c easy to learn?
What are the types of assignment statements?
What does the function toupper() do?
Multiply an Integer Number by 2 Without Using Multiplication Operator
Dont ansi function prototypes render lint obsolete?
What are derived data types in c?
Explain high-order bytes.
What are the benefits of c language?
What is the difference between exit() and _exit() function?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.