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

Recommended Answers

All 6 Replies

this site has online tutorials, just look in the c/c++ tutorials forum....

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.

printf("The numbers are %d and %d.",a,b);

you cannot use & operators to print variable value


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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.