How recursive bubble sort work

                                              Recursive Bubble Sort Base Case: If array size is 1, return. Do One Pass of normal Bubble Sort. This pass fixes last element of current subarray. Recur for all elements except last of current subarray. Example: Index=     0 1  2 3 4 5 6 7   100                          90 80 70 60 50 40 30  Array []= Suppose we want to sort the above in the increasing order by the recursive bubble sort. Make a get grater which will return the grater of the array. Compare the first and last element of the array if the first is greater than last the swap with each other. And again call the sort function and decrement the array size by 1; 1) 30                     90 80 70 60 50 40 100    ...

introduction to programing

                      

                                                                 if you want to learn the programming form basic then you are it right place.

in this blog post  we will start the c programming language from the start.

  1)   Tools
          we will be use the turbo c IDE.
 
first program in turbo c.
             
The following are basic commands for C Program.
       Preprocessor Directives (Standard Library Headers)
       main() function
       Comments
       Statement Terminator (;)
       clrscr()
       getch()

Step 1: Creating a New file

 Double click on Turbo C icon. Click “File” menu tab and select “New” as shown in figure below 

turbo c

Step 2: Saving New file

                             Click “File” menu tab and select “Save”. Name your file as “name.extension” as shown in following figures. You can save with any name but extension must be “.c”. Extension “.c” means that program written is in C Programming Language.  



Step 3: Basic Commands

Write the following basic commands as shown in figure and save it again ,


Step 4: Compile the Code

Code in C programming language is called as “source code” which is human understandable but not computer understandable. To make it understandable to computers or machines we must convert the source code to object code which means 0 and 1 and thus computer will able to understand the code. To convert from source code to object code, click “Compile” menu tab and select “compile” as shown in figures below. 







Step 5: Run the code

After compiling the code that is to convert source code to object code, now we need to execute the file in order to get the desired output. Click “Run” menu tab and select “run” in order to execute the program as shown in figures below 





Step 6: Open an existing File 

 To open an existing C Programming Language File, click “File” menu tab and select “open”. Click desired file name and select “open” to view the file as shown in figures below 





    Step 7: Quit Turbo C IDE

         To quit Turbo C Integrated Development Environment, click “File” menu  tab and select “quit” and write as “exit” on appearing black screen as shown in figures below 



Comments

Popular posts from this blog

simple calculator apps project in android studio

Arrays in C Programming Language

Pointers in C