Tuesday, July 28, 2009

The C statement which will execute the system command logout from within a program is:?

a. printf("logout");


b. sytem("logout");


c. setenv(logout);


d. system(logout);

The C statement which will execute the system command logout from within a program is:?
Hi !





The function system() invokes the command interpreter file from inside an C program and in turn will invoke the DOS batch file , or other program given inside the double quotes " "!





The general form of the system() is





int system(const char* command);


So the correct answer is b.system("logout");





Thanks and Regards !


Prince M. Premnath
Reply:c
Reply:b) system("logout");


if "logout: is a system command then only.


No comments:

Post a Comment