Monday, May 24, 2010

C programming source for beginners...?

i want to learn C programming on my own...do you know any book? online source? where can I download visual C..help please

C programming source for beginners...?
Well, first off, you are confusing two different languages - "C" is different than "Visual C", though they are related.





C is one of the older languages but its still very common. I'm also in the process of learning C and I'm currently using a Flash based seminar that you can download, called "Thinking in C". It progresses really fast, so you have to go through each chapter several times so you get a good grasp of it.


http://www.mindview.net/





There are tons of free C compilers out there - the one I downloaded is Dev-C++ (C is actually a subset of C++) from bloodshed software.





If you want some of the Visual compilers, MS has a free suite of them - just google "Visual Express" and it will come up.
Reply:www.cprogramming.com
Reply:"Beginning Programming for Dummies" is ok. I have it and it even comes with several editors, debuggers, and compilers. Not sure if there's a C one though.





There's probably a "C for Dummies" too, because there is a "C++ for Dummies."


Learning C/C++ programming?

I want to learn some C++ programming. I would like either a website or a good book to teach me it, and so it makes sense. I would need a good environment to then write the programs on my ... vista laptop.





Any other thoughts are appreciated!


Thanks a lot!

Learning C/C++ programming?
Well there are tons of free C++ and C compilers out there... one of the better books I used to learn was called "Beginning C++ Through Game Programming" by Michael Dawson. I don't do game programming, but honestly for object oriented programming it really does help to see it in these perspectives. This book will take you through the meat and guts at a rather rigorous pace for using console programming. Afterwards, you should have a good set up for doing WinForms or what ever other type of programming you might desire to do.





All that really makes C++ difficult in comparison to other OOP languages is wrapping your head around pointers ;)
Reply:Or else may be you can contact a C++ expert to speeden up learning. Check websites like http://askexpert.info/
Reply:To Lean C, if you want to learn thoroughly, you can use





"The C Language Handbook" by Weber Systems Staff
Reply:The best book on C++ is available for free here: http://www.mindview.net/Books/TICPP/Thin...





Here is a link for some free C++ compilers: http://www.thefreecountry.com/compilers/...

blue flowers

Where can I find C programming language?

I want to learn C


I have purchased a tutorial book "Let us C"


I have a computer at home


I have downloaded compiler "turbo C"


but it's no working


I think C is not installed in my pc


Can anyone help me


Plz...

Where can I find C programming language?
Turbo C is old, may not be compatible with today's 32-bit OS.





C-Free 4.0 seems to be widely used, try the link below:
Reply:Contact with near computer shop,


they can help you to install C++ in your computer.
Reply:I use Dev-C++, you can give that a try.





http://www.bloodshed.net/dev/devcpp.html





Microsoft Visual C++ is probably the best one, but it costs money.


C-programming...beginners..pro... plz help me out?

i need a program written in C on finding roots of a quadratic equations and finding the average of n even numbers. I need the programming. Or plz refer any website from where i can download the same. got assignment tommorow.

C-programming...beginners..pro... plz help me out?
Well Ill tell ya. If this is the type of student you are then the teacher is going to know you didnt write the code.





So you get a zero on the assignment or you receive a zero and punished for cheating.





Do your assignments on time and study more...any other answer to this question is morally corrupt.
Reply:Here u'll find dat
Reply:#include%26lt;stdio.h%26gt;


#include%26lt;math.h%26gt;


void main()


{


int a,b,c;





printf("enter the values of a b %26amp;c");


scanf("%d %d %d",%26amp;a,%26amp;b,%26amp;c);





if(b*b%26gt;=4*a*c)


{


rt1=(-b*b+sqrt(b*b-4*a*c))/(2*a);


rt2=(-b*b-sqrt(b*b-4*a*c))/(2*a);


}


else


printf("complex roots");





}








//average of n numbers


#include%26lt;stdio.h%26gt;





void main()


{


int num[100],n=1;i=1;


printf("enter the total no of numbers u want to enter");


scanf("%d",%26amp;n);








#include%26lt;stdio.h%26gt;


#include%26lt;math.h%26gt;


void main()


{


int a,b,c;





printf("enter the values of a b %26amp;c");


scanf("%d %d %d",%26amp;a,%26amp;b,%26amp;c);





if(b*b%26gt;=4*a*c)


{


rt1=(-b*b+sqrt(b*b-4*a*c))/(2*a);


rt2=(-b*b-sqrt(b*b-4*a*c))/(2*a);


}


else


printf("complex roots");





}








//average of n numbers


#include%26lt;stdio.h%26gt;





void main()


{


float num[100],n=1;i=1,sum=0;avg=0;


printf("enter the total no of numbers u want to enter1%26lt;=n%26lt;=100");


scanf("%f",%26amp;num[i-1]);








for(i=1;i%26lt;=n;i++)


{


printf("enter the new number ");


scanf("%f",%26amp;i);


}








for(i=1;i%26lt;=n;i++)


{


sum=sum+num[i-1];


}


avg=sum/n;





printf("the average of %f nos is:%f",n,avg);





}


How can i write a c language program to determine whether 4 digits are palindrome or no?

please help just by telling me how can i define palindrome in C program, i don't want the whole program.

How can i write a c language program to determine whether 4 digits are palindrome or no?
If you are only worried about 4 digits then:





If variable s is the 4 digit string


If (s[0] is equal to s[3]) and (s[1] is equal to s[2]) then it is a 4 digit palindrome.





Use your knowledge of C to implement this suedo code.





==Edit==


* Sheqi actually has an elegant solution (I gave it a thumbs up) but reversing the 4 digit is an extra step you don't need.


* richarduie has an example of what I said.


* I'm not sure what Alexanders code does without tracing it. It might work if when you said "digits" you meant numbers but I would trace it before I handed that one in.


* Curious George has some C++ code so don't copy that verbatim to answer your "C" question. It will just raise eyebrows.
Reply:This will work for any number of type "int":





int a = /*needed number*/;





int x = 0;


int z = a;


while (z)


{


x *= 10;


x += z%10;


z /= 10;


}


if (x==a)


{


/*number is a palindrome*/


}


else


{


/*number isn't a palindrome*/


}
Reply:bool isPalindrome(const std::string %26amp;str)


{


std::string::const_reverse_iterator itEnd = str.rbegin()++;


for (std::string::const_iterator itStart = str.begin(); itStart %26lt; itEnd.base(); ++itStart, ++itEnd)


{


if (*itStart != *itEnd)


{


return false;


}


} return true;


}
Reply:For a four-digit number, break the number into digits. For instance, 5678 would decompose into 5, 6, 7, 8. Compare the first and last for equality. Compare the second and third for equality. If both pairs are equal, the number is palindromic.





E.g.,





2452 --%26gt; (2 == 2) %26amp;%26amp; (4 == 5) --%26gt; true %26amp;%26amp; false --%26gt; false





3663 --%26gt; (3 == 3) %26amp;%26amp; (6 == 6) --%26gt; true %26amp;%26amp; true --%26gt; true





2452 is not a palindormic number; 3663 is.
Reply:A palindrome is a word, phrase, number or other sequence of units that has the property of reading the same in either direction.





Reverse the order of the string and compare with the original.


IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??

IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??

IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??
#define TRUE 1


#define FALSE 0





#define ESC 27


#define F2 188


#define UP 200


#define FWD 205


#define DN 208


#define BS 203





int getkey(void);


int keyhit(void);


void curr_cursor(int *, int *);


void cursor(int, int);


void hidecursor(void);


void unhidecursor(void);


void savecursor(void);


void restorecursor(void);


void set_cursor_type(unsigned);


#define normalcursor() set_cursor_type(0x0607)








look at this code to understand how each function works.





http://202.179.135.4/data/DDJ/articles/1...
Reply:It appears that the question period has expired. If you have received an answer that meets your needs, _please_ choose one of those as a 'best answer' as soon as you can; otherwise, this question will go to an automatic vote. If you haven't received a good answer for your question, you may want to consider the following,





1) Remove this version of your question and re-post your question. Newer questions get more activity on Yahoo! Answers than old ones.


2) If you do re-post your question, consider why it wasn't answered the first time. Could it be more specific? Could it be worded better? Were there grammatical or spelling errors? Was it in the best category? Can you provide more helpful details?





If it doesn't seem likely that re-posting your question will help you, then here's a listing of my favorite 'answer sites'. Maybe one of them will help you.





Answers.com http://www.answers.com/


Bartleby http://www.bartleby.com/


Yahoo Reference http://education.yahoo.com/reference/


HowStuffWorks http://www.howstuffworks.com/


Wikipedia http://en.wikipedia.org/wiki/Main_Page





Since I really haven't answered your question, it is not necessary to give me any points. Regards.

white flowers

C Programming error message?

C Programming error?





Hi, just started programming in C for uni.


Here's the relevant part of the program:





#define SIZE 100


{ int day_n, dayn;


char day[SIZE];


...


day_n = %26lt;some function%26gt;;


dayn = day_n%7;





if (dayn==0) day="Saturday";


else if (dayn==1) day="Sunday";


%26lt;etc%26gt;





printf("The day is a %c\n", day)


}





I keep getting error for each line with day in it:


left operand must be modifiable lvalue: op "="


I don't know what this means, or how to fix it, please help!


(I know this isn't the best way of writing it, but I can't be bothered to use a switch statement now!)

C Programming error message?
You can't copy a string like that.


look up strcpy().





Or, do something like this.


if(dayn==0)


printf("The day is Saturday")


if(dayn==1)


printf("The day is Sunday")
Reply:day_n and dayn are integers





enum {SATURDAY,SUNDAY...FRIDAY};





if(day_n == SATURDAY) // the enumerated value of SATURDAY is 0


strcpy(day,"SATURDAY"); // NOTE quoted string is not an integer


if(day_n == SUNDAY) // the enumerated value of SUNDAY is 1


strcpy(day,"SUNDAY");





etc...





?cant be bothered with a switch?





tm_horton@yahoo.com as I can help