## Posts

Showing posts from April, 2021

### C Pointer Program to get the last name from a full name

C Language Flag / Logo Another C programming here, this article will simply explain how to do char array operation in C language to get the last word from a whole sentence, or in this case we just rename our function to be more specific to get a person last name from its full name. This is a very simple C function to get a user last name from a user full name. This function will do some pointer operation, so if you are trying to learn about pointer in C, this may help you little bit on understanding about a pointer in C: char * get_last_name(char * full_name) { char *last_name = full_name; int last_space=0; for(int i=0; i 0) last_space+=1; last_name += last_space; return last_name; } This function will loop through all the characters bit by bit and will try to find any spaces located on that character. If a space is found, then store the last space pointer location and return that pointer as its function return. - We define our function called get_last_name to

### Recursive Function In C : Fibonacci, Factorial and Power of Numbers

C Language Flag / Logo These are some example programs in the C language using recursive function to calculate Fibonacci, Factorial and Power of numbers. You can use a loop, but for a purpose of giving you an example on how to use recursive so we are going to use recursive instead. Fibonacci This is to calculate the sum of fibonacci numbers that are less than the specified number user input. int fibonacci(int number) { if(number == 0){ return 0; } else if(number == 1) { return 1; } else { return (fibonacci(number - 1) + fibonacci(number - 2)); } } - Our function accept integer, then we compare them using if statement - If the parameter number equal to 0, then the return of function is 0 - Also If the parameter number equal to 1, then the return of function is 1 - But if the number is not 1 or 0, this function will call itself with a new parameter for the first call is the parameter -1 and the second parameter -2, then add both results. - This

### Everthing on the clouds soon - Google Drive, Onedrive and Windows File Explorer

File Explorer, Google Drive, One Drive As a forever Windows user, I have been using File explorer since the very first time I knew about this OS. It is the default program for browsing files on our computer, so we were familiarised with its feature, and that it’s very convenient to use, work smoothly, and make it very efficient for our daily use. Windows file explorer is a very simple program basically just showing a bunch of files, with its properties like file name, size, file format, date created, date updated, type of the files and many more handy features. Just like most file explorers in any operating system. File explorer actually has many more functionalities behind it, but for me i have never used most of them because file explorer is file explorer, it is just for working with files. Some features in file explorer  for example i have never used is the search box that is on the right top of the windows. I have almost never used it for example because it’s not always showing me