Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8706953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:44:42+00:00 2026-06-13T03:44:42+00:00

I have one program which takes a set of statements into a variable, and

  • 0

I have one program which takes a set of statements into a variable,
and how can i place that block of code(which is given into a variable as string) dynamically into present executing code for compilation and execution.
i am eagerly waiting for this solution.
any programming language having this facility..
if yes please paste the code for this question

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:44:43+00:00Added an answer on June 13, 2026 at 3:44 am

    Perl makes this simple.

    In Perl:

    eval q{ print "Hello world!\n" };
    

    or

    $code = ' print "Hello world!\n"; ';
    eval $code;
    

    See eval.

    Note, you should be careful where you get your code from. You’re exposing the full power of your language to whoever provides you with the input. Make sure it’s coming from a safe source. “string eval”, as it’s called, is high risk behavior in any language that supports it. Accepting input from a web user and running it as code on your server, for example, is just asking for a disaster.

    With respect to C: C is a compiled language, and the compiler isn’t available at run-time. On the other hand, there’s nothing stopping you from embedding a Perl interpreter in a C program, which would give you run-time compilation and execution of Perl code from within your compiled C application. For the record, C++ is in the same boat. It’s a compiled language, and the compiler isn’t a component of the runtime environment.

    As for Java, there’s this article: The Java 6.0 Compiler API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make the program which have one form that contains PNG image
I have a real world program that is similar to this one, which I'll
I have done one program that allow user can listen to the music via
I have a working java program, which takes set of files in a folder
Hi I have a program written in C++ in which one or two functions
I have one WORD variable in my program. WORD hour; But when I compare
I have two scripts that are called in one program, the first script creates
I have one application that prints messages from Test.exe in console .My java program
In following program . I have one doubt. I have declared one global variable
I have made a batch file that call another one program.bat , the first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.