Created
January 26, 2013 09:21
-
-
Save vividvilla/4641268 to your computer and use it in GitHub Desktop.
Program to find your system type (32bit || 64bit) - http://vivek.techiestuffs.com/2012/find-your-operating-system-32bit-64bit/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Program to find the type of operating system 32bit or 64 bit | |
#include<stdio.h> | |
void findit(char s[]) // Function which accepts array of characters(String) | |
{ | |
int a=sizeof(s); // Finding the size of s[] which is a pointer | |
if(a==4) // checking whether a is 4byte | |
printf(" 32bit system\n"); | |
elseif(a==8) //checking whether a is 8 byte | |
printf("64bit system \n"); | |
else | |
printf("WTF !!!! \n"); // If above two condition doesn't satisfy then print this line. | |
} | |
void main() | |
{ | |
findit("a"); // passing "a" to the function findit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment