This is the code do look at it. I just want change it in switch statement. will stuck in it. it is unix code.

commands[0] = (char )"ls"; params[0] = (char)0;
commands[1] = (char )"who"; params[1] = (char)0;
commands[2] = (char )"date"; params[2] = (char)"+%d/%m/%y";
commands[3] = (char )"ps"; params[3] = (char)"-f";
commands[4] = (char )"echo"; params[4] = (char)"Zafar Ullah";

Should i use switch statement like switch(commands[a]) and increment a in switch cases.

Recommended Answers

I'm having trouble deciphering that incomprehensible mess. Could you please rephrase your question?

Jump to Post

All 2 Replies

I'm having trouble deciphering that incomprehensible mess. Could you please rephrase your question?

what is that thing ? it's unix but i want to know the function and what it does?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.