hi guyz
Am new to Daniweb.I am Vinay Kumar,currently doing 1st year CS in india.
I did an intrductory course in computing last sem.I learnt some java.
Now I want to learn c seriously.
Please help me by suggesting some books,online tutorials etc.
Thanking you

hey b4 goin for online tutorials first switch to ur books.....I think for begenners Yashwant karnetkar's book in c is best.....or u can also follow deitel & deitel - C how to program...however for any prob feel free to post ur query

Hi people,
I am learning c.
I use gcc compiler.PLz find out the error in this code.
int a,b;
scanf("%d%d",&a,&b);
printf("The numbers are %d and %d."&a,&b);
when I run this,I got some strange negative numbers all times.I first thought it might be because numbers were outside the int range in c.But later I found out for any int
they are giving negative results.

you cannot use & operators to print variable value


in the printf statement use a,b instead of &a and &b

if I'm correct the & operator will print the value of the address stored at that location, rather than obtain the value in that memory location?

ie if a = 8; is stored in chip 1000

putting the &a will print out 1000 as opposed to printing out a which would be 8

This article has been dead for over six months. Start a new discussion instead.