can we write a c program with out using main

Answer Posted / kamini

#include<stdio.h>
#include<conio.h>
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)

void begin()
{
printf(" hello ARUN");
getch();
}

Ans was correct but if the function is declare int dn it has to be return some value so it should be void.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2643


What is the default value of local and global variables in c?

554


What are loops c?

609


Explain what are reserved words?

630


What is type qualifiers?

653






What are qualifiers and modifiers c?

540


Do pointers need to be initialized?

556


Write a program to print "hello world" without using a semicolon?

589


What is dynamic variable in c?

558


What are reserved words?

649


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

620


Did c have any year 2000 problems?

647


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

22183


Explain how do I determine whether a character is numeric, alphabetic, and so on?

647


How can you tell whether two strings are the same?

821