Posts

Sorting & Searching

Image
Sorting: Simple sorting: Bubble sort  Membandingkan index satu per satu dengan sebelahnya dan swap dengan kondisi jika index lebih besar dari sebelahnya untuk urut berdasarkan ascending , jika lebih kecil maka descending  Selection sort Menbandingkan index dengan semua data sampai mendapat yang paling kecil atau paling besar lalu di swapkan ke depan Insertion sort Menbandingkan index dengan sebelahnya jika kondisi true maka diswap , setelah diswap maka akan di cek lagi kondisi dengan index sebelumnya sampai terurut , jika kondisi false maka akan lanjut ke index selanjutnya Intermediate sorting: Quick sort Membagi array menjadi bagian - bagian dengan cara menentukan pivot yang paling pertama atau yang paling terakhir , lalu dibagi dengan cara jika nilai lebih besar dari pivot maka akan di sub array pertama , jika nilai lebih kecil maka di sub array kedua , pada sub array sama akan diulang proses nya , sampai tidak bisa di bagi lagi , maka akan terurut ...

FILE Processing

Basics of File Handling in C So far the operations using C program are done on a prompt / terminal which are not stored anywhere. But in software industry, most of the programs are written to store the information fetched from the program. One such way is to store the fetched information in a file. Different operations that can be performed on a file are: Creation of a new file (fopen with attributes as “a” or “a+” or “w” or “w++”) Opening an existing file (fopen) Reading from file (fscanf or fgetc) Writing to a file (fprintf or fputs) Moving to a specific location in a file (fseek, rewind) Closing a file (fclose) The text in the brackets denotes the functions used for performing those operations. When working with files, you need to declare a pointer of type file. This declaration is needed for communication between the file and program. FILE *fp; Opening a file is performed using the library function in the  "stdio.h"  header file: fopen(). The...

Cloud Computing

Cloud Computing Cloud refers to a Network or internet , which is present at certain place which accessible from any location over public or private network Cloud Computing refers to manage or access the application online Cloud Computing tend to separate infrastructure with business , whereas terms "infrastructure" refer to hardware , networking , software, which managed as one entity , and terms "Business" refers to procedural workflow, strategic enforcement. Deployment examples : Social Networking Facebook, Instagram, LinkedIn Data Sharing Email, Dropbox, Google  Drive Education Quipper , Smart Campus , e Learning , e Library Business Online shop portal , Google doc , Personal / Corporate Website Deployment Model : Private Cloud : Operand solely in an organization Public Cloud : Accessible over the internet for general consumption Hybrid Cloud : Combination of Private and Public Cloud Service Model :  Infrastructure as a S...

Pointers and Arrays

Pointers and Arrays ·         Pointer :  A variable that store another variable address Syntax : <type> *pointer_name; Use *  = Content of the variable Use & = Address of the variable           Int number  = 10;           Int *number1 ;           number1 = &number; for pointer to pointer :           Int number  = 10;           Int *number1 ;           Int **number2 ;           number1 = &number; Example : int main(){           int angka1 = 10;  ...