aryafarzan.wordpress.com
enum intro in C | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/02/20/enum-in-c
Arya Farzan's Blog. Arya Farzan's weblog. Enum intro in C. Enum intro in C. February 20, 2010. Enums can be used to reduce #define statements in a C program, although they can have more uses. Here is an example of enum. One thing to keep in mind is that enums start from 0 so in the following line of code. Enum Days{Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday};. Sunday is assigned 0, Monday is assigned 1 and so on. Enum Days{Sunday = 1,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday};.
aryafarzan.wordpress.com
aryafarzan | Arya Farzan's Blog
https://aryafarzan.wordpress.com/author/aryafarzan
Arya Farzan's Blog. Arya Farzan's weblog. Installing Oracle Java 7 on Debian. March 13, 2013. I’ll just get to the point. First you need to download it and transfer it to your Linux box. Tar -xzvf jdk-7u17-linux-i586.gz -C /usr/jvm. Now you can make the java and javac available like an alias by the following. Update-alternatives - install /usr/bin/java java /usr/jvm/jdk1.7.0 17/bin/java 1065. Update-alternatives - install /usr/bin/javac javac /usr/jvm/jdk1.7.0 17/bin/javac 1065. And you are done. It is v...
aryafarzan.wordpress.com
Installing Oracle Java 7 on Debian | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2013/03/13/installing-oracle-java-7-on-debian
Arya Farzan's Blog. Arya Farzan's weblog. Installing Oracle Java 7 on Debian. Installing Oracle Java 7 on Debian. March 13, 2013. I’ll just get to the point. First you need to download it and transfer it to your Linux box. Tar -xzvf jdk-7u17-linux-i586.gz -C /usr/jvm. Now you can make the java and javac available like an alias by the following. Update-alternatives - install /usr/bin/java java /usr/jvm/jdk1.7.0 17/bin/java 1065. And you are done. You can check your installation by typing the following.
aryafarzan.wordpress.com
C++ Reference Operator | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/03/19/51
Arya Farzan's Blog. Arya Farzan's weblog. March 19, 2010. Reference is a C feature, it is not available in the C programming language. A reference is less powerful but safer than the pointer. Reference is having two names for the same variable. Let us start by looking at some examples. Int& rA = A;. Cout rA endl;. Cout rA endl;. No matter which variable’s value gets changed both A and rA change. References can be used instead of pointers and you do not have to use the * operator in your functions.
aryafarzan.wordpress.com
Pointers to functions in C/C++ intro | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/02/10/pointers-to-functions-in-cc-intro
Arya Farzan's Blog. Arya Farzan's weblog. Pointers to functions in C/C intro. Pointers to functions in C/C intro. February 10, 2010. Pointers to functions are a very interesting and elegant programming technique. They can be used to replace long switch or if statements! Anyone can start using pointers to functions all you have to do is to understand what they are and to learn its syntax. What is a Function Pointer? Function pointers are simply pointers that point to a function! Int add(int a, int b){.
aryafarzan.wordpress.com
March | 2013 | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2013/03
Arya Farzan's Blog. Arya Farzan's weblog. Archive for March, 2013. Installing Oracle Java 7 on Debian. March 13, 2013. I’ll just get to the point. First you need to download it and transfer it to your Linux box. Tar -xzvf jdk-7u17-linux-i586.gz -C /usr/jvm. Now you can make the java and javac available like an alias by the following. Update-alternatives - install /usr/bin/java java /usr/jvm/jdk1.7.0 17/bin/java 1065. And you are done. You can check your installation by typing the following.
aryafarzan.wordpress.com
Pointers in C/C++ | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/01/26/pointers-in-cc
Arya Farzan's Blog. Arya Farzan's weblog. January 26, 2010. Pointers are sometimes confusing to C/C programmers at first, but they don’t have to be! Pointers are just like any other variable in C/C but instead of holding an actual value they hold an address. I will use some simple code to show you how pointers work. Take a look at the code below. Int number = 4;. Int* pNumber = &number;. Int number = 4;. Int* pNumber = &number;. Printf(“%u, %u n”, &number, pNumber);. The output would be:. Enum intro in C.
aryafarzan.wordpress.com
Passing arguments to a C program from terminal | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/02/21/passing-arguments-to-a-c-program-from-terminal
Arya Farzan's Blog. Arya Farzan's weblog. Passing arguments to a C program from terminal. Passing arguments to a C program from terminal. February 21, 2010. Have you ever wondered how some UNIX commands take arguments? It can be done very easily with C. You can code the rm, cp, ect commands in no time. Here is a sample code which you can use to understand passing arguments. Int main(int argc, char* argv[]){ int i; for(i = 0;i argc; i ){ printf(%d: %s n, i 1, argv[i]); } return 0; }. Enum intro in C.
aryafarzan.wordpress.com
April | 2010 | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/04
Arya Farzan's Blog. Arya Farzan's weblog. Archive for April, 2010. Dynamic Memory Management Overview with C 1. April 6, 2010. Dynamic Memory allocation is done by using the keyword “new” in c . When creating dynamic memory a pointer is always. Needed. Let us start by looking at one very simple example. (the code below does not deallocate memory which I will get to next.). IPtr = new int;. IPtr = new int;. Delete *iPtr / simply remove the allocated memory pointed by *iPtr. April 6, 2010. It is common to ...
aryafarzan.wordpress.com
March | 2010 | Arya Farzan's Blog
https://aryafarzan.wordpress.com/2010/03
Arya Farzan's Blog. Arya Farzan's weblog. Archive for March, 2010. March 19, 2010. Reference is a C feature, it is not available in the C programming language. A reference is less powerful but safer than the pointer. Reference is having two names for the same variable. Let us start by looking at some examples. Int& rA = A;. Cout rA endl;. Cout rA endl;. No matter which variable’s value gets changed both A and rA change. Just left OOP344 class. Passing arguments to a C program from terminal.