Exforsys

Free Training

is it possible C program without main() fn

This is a discussion on is it possible C program without main() fn within the C and C++ forums, part of the Programming Talk category; actually tre is no way u can erite a c prog without main .. now its jus abt bluffing .. ...

Go Back   Exforsys > Programming Talk > C and C++

Exforsys.com


C and C++ C and C++

Reply

 

LinkBack Thread Tools Search this Thread
  #1 (permalink)  
Old 05-30-2009, 07:47 AM
Junior Member
 
Join Date: May 2009
Posts: 1
harsh gupta is on a distinguished road
is it possible C program without main() fn

actually tre is no way u can erite a c prog without main ..
now its jus abt bluffing ..

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

int begin()
{
printf(" hello ");
}

this prog is encoding main into some other name (here it is "begin ")
## is a merging operator..


Is it correct.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-20-2009, 08:32 AM
Junior Member
 
Join Date: Jul 2009
Posts: 1
rajagiri4 is on a distinguished road
i think is not possible
__________________
earning
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-29-2009, 04:17 PM
ba7ora's Avatar
Junior Member
 
Join Date: Jul 2009
Location: Oman
Posts: 5
ba7ora is on a distinguished road
antil now i didnt see a program without main()
have u tried 2 write a program without main ()????
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-10-2009, 03:37 AM
Junior Member
 
Join Date: Aug 2009
Posts: 1
shaju1981 is on a distinguished road
It is possible

you have to set the entry point as a function name(in this case "Begin") in the linker.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-24-2009, 03:47 AM
Junior Member
 
Join Date: Aug 2009
Posts: 2
sitaram murthy is on a distinguished road
Thumbs up No its not possible to to write a prgm without main()

hi....... main() indicates the starting of a prgm..... it intimates the control statement to start execution from 'main()' statement......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-25-2009, 06:17 AM
Junior Member
 
Join Date: Aug 2009
Posts: 2
sitaram murthy is on a distinguished road
'c' prg without main()

hi harsha.can u elobaorate ur explanation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-10-2009, 11:09 AM
padmanaban2's Avatar
Junior Member
 
Join Date: Aug 2009
Posts: 2
padmanaban2 is on a distinguished road
It is not possible, since only from the main() function we are calling other functions.
__________________
jobs in india
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 06-15-2004 07:00 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 06-01-2004 07:01 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit Tech FAQ 0 06-01-2004 07:00 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 05-15-2004 07:00 AM
Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 rubywand@swbell.net Tech FAQ 0 04-04-2004 08:29 AM


All times are GMT -4. The time now is 06:39 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.