Friday, December 10, 2010

Real Player


Download RealPlayer for FREE

Thursday, December 9, 2010

use of a constant

//This program demonstrates the use of a constant

#include

int main()
{
const int constantNumber = 100; //Declaration of a constant.

It must be initialized immediately, else it picks up a garbage value.

//constantNumber = 30; Will generate an error. Cannot change the value of a constant

printf("The value is %d", constantNumber);
return 0;
}



Download RealPlayer for FREE

use of arithmetic operators and its precedense

//This program demonstrates the use of arithmetic operators and its precedense

#include

int main()
{
int value1, value2, value3;

clear();

value1 = 10;
value2 = 20;

value3 = value1 + value2 * 2;

printf("\nvalue1=%d, value2=%d, value1+value2*2=%d", value1, value2, value3);

value3 = (value1 + value2) * 2;

printf("\nvalue1=%d, value2=%d, (value1=value2)*2=%d", value1, value2, value3);

value1 = 20;
value2 = 10;

value3 = ((value1/value2)*value2)+(value1%value2);
printf("\nvalue1=%d, value2=%d, ((value1/value2)*value2)+(value1%value2)=%d", value1, value2, value3);
return 0;
}



Download RealPlayer for FREE

Some C Refrence Books

main Book is Lets C By Yashwant Kanitkar obviously but here are some other Reference Books


References

1. ‘C’ Odyssey
By: Vijay Mukhi

2. C under UNIX
By: Y.P. Kanetkar

3. Thinking in C
By: Bruce Eckel

4. Let Us C
By: Y.P. Kanetkar

5. Programming in C
By: Dennis Ritchie and Kernighan

Thanks,
Tushar Khoje



Download RealPlayer for FREE

Weitage

C Programming Topic Wise Weightage

Topics Percentage Weightage Marks
Arrays 12 to 14 % 05 to 07
Structures 12 to 14 % 05 to 07
Pointers 12 to 16 % 06 to 08
Functions 10 to 12 % 04 to 06
Preprocessors 02 to 06 % 01 to 03
File handling 18 to 22 % 09 to 11
Command line arguments 02 to 06 % 01 to 03
Standard Coding Practices 10% 05
Total marks 100% 50




Download RealPlayer for FREE

Reverse of a String using Recursion

/* C Program to print Reverse of String Using Recursion */


#include

int main()
{
int num,rev;

printf("\nEnter a number :");
scanf("%d",&num);

rev=reverse(num);
printf("\nAfter reverse the no is :%d",rev);
return 0;
}

int sum=0,r;
reverse(int num)
{

if(num)
{
r=num%10;
sum=sum*10+r;
reverse(num/10);
}

else
return sum;
return sum;
}



Download RealPlayer for FREE

To Print Prime Factors of a number

/* C Program To Print Prime Factors of a number */

#include
int main()
{
int num,i=1,j,k;
printf("\nEnter a number:");
scanf("%d",&num);
while(i<=num){
k=0;
if(num%i==0){
j=1;
while(j<=i){
if(i%j==0)
k++;
j++;
}
if(k==2)
printf("\n%d is a prime factor",i);
}
i++;
}
return 0;
}


Download RealPlayer for FREE