wap to print "hello world" without using the main function.

Answer Posted / kk

Here is a basic sample which uses main as the entry point..
#include <stdio.h>
#define myProxyMain main

int myProxyMain()
{
printf("\nHello World !!");
getchar();
return 0;
}

Just note that at source level there is no main but once
preprocessing we still have the old main() method.. Which
means we still have the main method in the object module as
well as the executable..

Is This Answer Correct ?    37 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why doesnt this code work?

609


What is an array in c?

584


Is linux written in c?

594


Why do we need arrays in c?

572


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

1793






Write a factorial program using C.

636


When should the const modifier be used?

650


What do you understand by normalization of pointers?

617


Explain the difference between null pointer and void pointer.

657


Write a simple code fragment that will check if a number is positive or negative.

700


What are the different types of data structures in c?

593


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

1646


Explain what are linked list?

613


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

1496


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

689