C Programming and Computer Geeks

Search MY Blog

Tuesday, 26 November 2013

Program for displaying ASCII values of English Alphabets


#include “stdio.h”

int main()
{
     int i = 0;

     for( i = 65; i <= 122; i++)
     {
          if (i >= 91 && i <= 96) //to non-alphabet characters
          continue;
          printf("%c - %d",i,i);

          printf("\t");
     }

     getch();
     return 0;
}


 
Output:

ASCII Values of English Alphabets
ASCII values of English Alphabets





 

Click here for more C Faq


Thursday, 21 November 2013

Quick-sort Algorithm with Hungarian folk dance


Very good video on Quick sort Algorithm.This is the easy way to understand the Quick sort algorithm
useful video for learners/beginners in C Programming.




Concept of Quick Sort:
Quick sort is a divide and conquer algorithm. Quick sort first divides a large list into two smaller sub-lists: the low elements and the high elements. Quick sort can then recursively sort the sub-lists.


Quick Sort algorithm
Quick Sort



The quick sort algorithm works by partitioning the array to be sorted, then recursively sorting each partition. In Partition, one of the array elements is selected as a pivot value. Values smaller than the pivot value are placed to the left of the pivot, while larger values are placed to the right.
 
See the left side placed Quick sort animation for reference.

 

Follow My YouTube Channel on LTE @ Long Term Evolution/4G

Monday, 18 November 2013

My Google+ Page on C Programming Concepts

Dear Readers .. Please find my google page on C Programming and C concepts @ Google+ click on this for my Google+ page for more discussion on C Programming Concepts..

Thanks
http://www.neentech.blogspot.com

Sunday, 14 July 2013

Arrays & Dynamic Memory Allocation - Basic Faq

1.How can I set an array's size at run time?  How can I avoid fixed-sized arrays?
ANS: The equivalence between arrays and pointers allows a pointer to malloc'ed memory to simulate an array quite effectively. After executing
               #include <stdlib.h>
               int *dynarry;
               dynarry = malloc(10 * sizeof(int));
(and if the call to malloc succeeds), you can reference dynarry[i] (for i from 0 to 9) almost as if dynarry were a conventional, statically-allocated array (int a[10]). The only difference is that sizeof will not give the size of the ``.

Friday, 5 July 2013

C Faq - Part 3

1. What will be output if you will compile and execute the following c code?
#include<stdio.h>
int main(void)
{
  int a=5;
  float b;
  printf("%d",sizeof(++a+b));
  printf(" %d",a);
  return 0;
}


Tuesday, 2 July 2013

C Basic Faq


1. What is C language??
The C programing language is a standardized programing language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system. It has since spread to many other operating systems, and is one of the most widely used programming languages. C is prized for its efficiency, and is the most popular programing language for writing system software, though it is also used for writing applications.

Search This Blog