Q:

How to point char *argv[] from Main function to the table

I will try to explain what I want to do. I've got the program (which doesn't work), which is written to be called from CMD console in windows. I'm using parameters from main function
int main(int argc, char *argv[])

But in this case I can't use the debugger to find what i'm doing wrong...
Am I able to somehow connect char *argv[] argument to created table in code ?
Example:
int main(int argc, char *argv[])
{
char tablica[] = { 'K','2','+','1','-','3','*','(','3','+','2',')','*','2' };
tablica = **argv; //// IDK HOW TO CONNECT THESE TWO 

A:

here's how you can fake argument passing and substitute with your array
#include <stdio.h>

int main(int argc, char* argv[]){
     char *tablica[] = { argv[0],"K","2","+","1","-","3","*","(","3","+","2",")","*","2" };
     int i;
     argv=tablica;
     argc=sizeof(tablica)/sizeof(tablica[0]);

     for (i=0;i<argc;i++)
     {
         printf("%s\n",argv[i]);
     }
     return 0;
}

result:
your_executable
K
2
+
1
-
3
*
(
3
+
2
)
*
2

notes: in order to be compliant with argc,argv:

I have changed the array of chars to an array of char * (single quotes => double quotes). That seems logical, since without that you could not pass for instance numbers > 9 in your arguments!
I have overridden argc as well (automatic computation from your array)
I have inserted program name in your array, else it would shift argument parsing.

