You write a shell the same way you write any other application program; it just happens to be the one which gets automatically loaded after the OS has finished booting. Of course it needs to be able to do useful things such as execute other programs.
Otherwise, it is just the normal interactive loop: Get a command from the user, do whatever is necessary, get a command from the user, do whatever is necessary, get a command from the user.....
Jeez, another thread digger who should have stayed quiet. Though somewhat remarkably, code tags have been used on the first post - I'm intrigued....
Anyway, onto the faults - there's one for almost every line.
> void main ( void )
Sorry to burst your bubble, but ANSI-C requires main to return an int.
Sloppy books and compilers don't count as references.
> char *entry;
Erm, where is this pointing?
Not at anything you can be sure of!
> while ( true )
true isn't a C keyword, and you haven't declared it.
> printf("%c ",prompt);
In the absence of a newline, or a call to fflush(stdout), there is no reason to believe the user would even see a prompt.
Not to mention the fact that entry is uninitialised, you don't have any control over how much data gets input by the user. They could type in "war and peace" as a long string, then where would you be?
Why? This thread has been dead for months. We could have given you an infraction instead for resurrecting a dead thread and for giving an answer to someone's homework question -- IOW cheating. Consider yourself lucky.
**how to solve invalid keystore error in android studio here is error report----------------------->
here is error report--------> error:Error:java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key palash from store "D:\MyApplication3.idea\workspace.xml": Invalid keystore format ...