Search:

Type: Posts; User: Soham

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    4,244

    You are right. I know you had just pointed out...

    You are right. I know you had just pointed out the general structire of the program. I just completed it for the benefit of others too. (without remove).

    I have used realloc so that only needed...
  2. Replies
    17
    Views
    4,244

    Thanks matsp. Very good idea. I have made some...

    Thanks matsp. Very good idea.

    I have made some syntax changes to your program and it works very good. Really a good idea.



    #include <stdio.h>
    #include <stdlib.h>

    #define ADD_VAR(t, x)...
  3. Thread: Newline problem

    by Soham
    Replies
    6
    Views
    1,544

    By mistake I preserved the ~ character in the...

    By mistake I preserved the ~ character in the file. Corrected in the following



    int createfile() {
    FILE *f;

    char filename[256];
    char filetext[2048];
  4. Thread: Newline problem

    by Soham
    Replies
    6
    Views
    1,544

    The following code also works int...

    The following code also works



    int createfile() {
    FILE *f;

    char filename[256];
    char filetext[2048];
  5. Replies
    11
    Views
    4,652

    I can even use the following also (Though not...

    I can even use the following also (Though not switch statement)



    #include <stdio.h>
    struct {
    char opcode[5];
    int ret_val;
    } my_struct[] = {{"add", 1},
    ...
  6. Replies
    17
    Views
    4,244

    I want to execute it also. I think it is not that...

    I want to execute it also. I think it is not that easy. I wanted something like Dynamic SQL from Oracle.

    ANyways, thanks.
  7. Replies
    17
    Views
    4,244

    That also will work. But my original point is...

    That also will work. But my original point is different. I wanted to know whether there is any other technique through which we can form a statement and execute it at runtime.

    Thanks

    Soham
  8. Replies
    17
    Views
    4,244

    Not really! I was thinking of this in a larger...

    Not really! I was thinking of this in a larger perspective. For this small scale problem, we can use if or swich statement or a program of the following kind. But I wanted to know whether there is...
  9. Replies
    17
    Views
    4,244

    Yes.

    Yes.
  10. Replies
    17
    Views
    4,244

    There are three integer variables x1, x2 and x3...

    There are three integer variables x1, x2 and x3 having values 1,2 and 3 respectively. Another fourth array variable x contains either x1, x2 or x3. I want to print the value of the variable which is...
  11. Replies
    17
    Views
    4,244

    Runtime formation and execution at runtime

    Is there any way we can form and execute a statement at runtime in C?
Results 1 to 11 of 11