system call as variabe

R

rudra

i want to use system bit as a input of my c program. i wrote a code:

#include <stdio.h>
//#include <stdlib.h>
main()
{
unsigned sys;
unsigned i686;
// int i386;
sys=system("/bin/uname -m");
printf ("%u",sys);
if (sys = i686) printf("the syst. 32 bit\n");
else printf("64bit\n");
}

but its not quite working.
can you people plz help me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top