Tuesday, July 14, 2009

The C Family!?

This paper is long overdue. The C family. What are they? I'm still pretty clueless. But just like the reporters, they're not just diong this for no reason. They are trying to make it to the Top Contributer List. Just like the Reporters. Rumor has it that the Reporters ARE the C Family. But the only thing is, there are some new thigns. As in, Ann C and the rest of the C family are different. Ann C(Which rumor has it is Anne the Lover or Monstrar) has been threatening other people. As in, threatening to get their account suspended if they do not make another edition to the C Family. They have been pllotting on 'Aunt Lucy C' who will be coming later this evening. In other news, Martin SAYS he's gone, but he's really back. In another account though. The avatar looks the same and he says the same age in his About Me Profile. But he goes by another name. I used to have a link to his profile, but I lost it. But just look out for him.

The C Family!?
Thanks for the Y!A news! The C family in my opinion is just some girl who makes a bunch of different accounts having to do with her family. Eventually she'll probably run out of options.
Reply:ye
Reply:hah actually i did enjoy this.. i can not stand the C family.. so it was very interesting. thanks for the update!
Reply:um...ok i think that my iq just dropped about 10 ponts after reading that.....you are just adding fuel to the fire by posting this. idiot.
Reply:I %26lt;3 the C family!
Reply:i did... cuz im really bored. we should kick these these C idiots out of Y!A like we did to the reporters!











wait wait wait i change my answer. hahahhaa you're probably the C family. and the reporters... or both
Reply:What?!? sheesh....there is life out there, climb out of there and go find it!
Reply:keep making more reports


there are very important


lol i really do love them
Reply:haha loser nerdish , do you have friends ?


C++ Sorting Numbers using procedures?

Write a procedure void sortTwo (int%26amp; n, int%26amp; m) that swaps the values of n and m if n is greater thanm and otherwise leaves n and m unchanged. For example,





int a = 2;


int b = 3;


int c = 4;


int d = 1;





sort(a, b); /* a is still 2, b is still 3 */


sort(c, d); /* c is now 1, d is now 4 */





Also write a procedure sortThree(int%26amp; x, int%26amp; y, int%26amp; z) that swaps its three inputs to arrange them in sorted order that uses sortTwo. For example,





int a = 3;


int b = 4;


int c = 1;





sortThree(a, b, c); /* a is now 1, b is now 3, c is now 4 */

C++ Sorting Numbers using procedures?
well first the methods need to take the int as references. so it'll look something like this.





sort(int %26amp;a, int %26amp;b)


{


if(a %26gt; b)


{


int temp = a;


a = b;


b = temp;


}


}








sort(int %26amp;a, int %26amp;b, int %26amp;c)


{


sort(a,b);


sort(c,b);


sort(a,b);


}

flowering plum

C ,c ++ books related?

iam feeling difficult to read c book in english . if u suggest some good books for c language available in tamil language , i would be greatful.





then there are different topics in c --


ansi c ,data structures in c likewise . how many types or topics involved in these .





also tell me how much we need to read to attend a campus interview for fresh engineers in an IT company,

C ,c ++ books related?
Hi,





I am not sure whether any C language book is available in tamil . But few pointers I would like to give:





1) If you are a Final year Non-compscience Engg graduate, do not worry specifically about interns of C or C++. Most of the companies(MNCs atleast) will not test a fresher from Non-CS background with Language related question.


2) In Campus interviews, Normally they will look for the Communication, Attitude and ofcourse your aggregate marks till the 6th semester.


3) May be you can brush up little bit on Overall computer science topics %26amp; terminologies like:


a. What is Normalisation


b.What are cods rules


c.what is C language best suited for


d.What is pointer in C


e.How will you handle files in C


f. oops concepts like inheritance, multiple inheritance,Friend function,Private / public /protected members( If you understand the basics of oops, nothing more you need to worry about C++ for interview )


g. Few Databases you heard of (ORacle, sybase upto Access) and what level of data they can handle ( Oracle is the Robust one with MS-Access stands last as Ms-Access can't handle more than 2 GB of data-This is what the situation with Access atleast when we used it around the year 2001)


h.1 or 2 points about Win XP or Vista and linux


i.What is SAP and what is it for.





Basically what I am trying to say is , If you do not have any exposure onto computer languages, instead of learning a language full @the last minute, spread out wide ( and gather bits %26amp; pieces of information across multiple computer science related terminologies and latest trends) which can impress the interview panel.





Coming back to your question:


Important topics in C :(atleast in interview perspective)


1) Pointers


2) File handling


3) C Libraries-Basics For Ex.%26lt;stdio.h%26gt; %26lt;math.h%26gt;


4) Functions ( By Value %26amp; Address)





Following link will help you a lot


http://www.fresherscircle.com/index.html





If you have further doubts on this topic, feel free to respond with more specific questions.


All the Best
Reply:deitel books
Reply:I dont exactly remember the names of the writers but I can list some books that were useful to me for my CDAC entrance exam. Unfortunately, they are in English not in Tamil.


1) Let us C (Kanitkar)


2) Let us C++(Kanitkar)


3) Introduction to C, C++ and Data Structures-Robert Lafore


4) C, C++, Data structures-Tata Mc Graw


Let a,b,c denote the three sides of a triangle and A,B,C the corresponding opposite angles. Only..?

one of the expression below has the same value for all triangles. Which one is it?


A) sin A + sin B + sin C;


B) tan A tan B + tan B tan C + tan C tan A;


c) (A + B + C)/(sin A + sin B + sin C);


D) cot A cot B + cot B cot C + cot C cot A;


Kindly explain your answer...

Let a,b,c denote the three sides of a triangle and A,B,C the corresponding opposite angles. Only..?
It's the last one, cot A cot B + cot B cot C + cot C cot A. This follows immediately from setting C = pi - A - B, using the identity cot(pi - x) = - cot x, and then substituting in the formula which gives cot (A + B) as a function of cot A and cot B.


C++.........which on is the better version of c++........?

1.Borland's Turbo C++ Explorer,


2.Microsoft's Visual C++ 2005,


3.Open Watcom C/C++ Compiler


i want to learn c++,please tell me a good website,which version should i have ?

C++.........which on is the better version of c++........?
I would personally recommend GCC's g++ which is free and open source. I don't know much about 1 and 3 but be very careful with VC++ as it can teach you very bad habits and does alot of things in a very nonstandard way. It does have a nice interface though :p


[1] is a version of GCC that will run on windows.
Reply:microsoft visual one is a good one.
Reply:Of those three, Microsoft's Visual C++ 2005 is by far the largest, most dominant, and best supported IDE. There are a few answers here telling you to use open source environments--I suggest you do NOT use the open source ones until you are more comfortable programming. While they have some nice features, the user interfaces often leave a lot to be desired.





One of the arguments against Visual C++ is that it costs money. This is no longer true: Visual C++ 2005 Express Edition is now free of charge. It does leave out a few features, but they're not anything you're likely to miss (MFC support, anyone?). Note that you may want to download and install the "Windows Platform SDK" as well, but that is also free.





One other answer also commented that Visual C++ is non-standard and can teach some bad habits. If you use the .Net mode then this is true (you will be given the option of whether to use .Net when you create new projects). The C++ used for .Net has many custom extensions that only Microsoft uses. When you are using normal C++, however, they have a very good standards compliant compiler (roughly equal to G++ on standards, and with much better optimization).
Reply:i recommend you visual c++, and you can simply go to the microsoft developer center of visual c++ to study, and they recommend you a lot a associated community website for asking questions


search the keyword


microsoft developer center visual c++


the software is downloadable from microsoft official website
Reply:For a begginer





Borland C++ is advisable





and you can easily run and learn





no need of much configurations in it..





All the best
Reply:srry i dont get
Reply:Go with DEV C++. Simple to use IDE, it's free, and for a begginer you can put it on a usb drive and carry it with you.


Help!!! U = {a, b, c, d, e, f, g, h}. A = {a, b, c, d, e}. B = {c, d, e, f}.?U = {a, b, c, d, e, f, g, h}.?

Help!!! U = {a, b, c, d, e, f, g, h}. A = {a, b, c, d, e}. B = {c, d, e, f}.?


U = {a, b, c, d, e, f, g, h}. A = {a, b, c, d, e}. B = {c, d, e, f}.


Which of the following is (A intersect B)C








Pick one:





{a,h,b}


{f,g,h}


{a,b,f}


{a,b,f,g,h}

Help!!! U = {a, b, c, d, e, f, g, h}. A = {a, b, c, d, e}. B = {c, d, e, f}.?U = {a, b, c, d, e, f, g, h}.?
If C is complement (') then the ans is {a,b,f,g,h}
Reply:A intersect B is none of the above. As for U??? and you didn't define C????





But do you learn anything by asking strangers - go to your textbook and look up sets and subsets
Reply:A intersect B = {d,e} since they have those in common


Then ( A intersect B) c = all the elements in U except d and e





={a,b,c,f,g,h}

nil

Simple C/C++ Antispyware?

Hello. I know a fair amount of C and C++ and would like to make (or contribute to an Open Source) antispyware application.





Does anyone know of either;





An open source C or C++ antispyware application I can contribute to?





OR





A C or C++ antispyware codebase which I can then work on?





I have tryed Googling but have found nothing of real interest so far.





Thank you in advance,


From Miki.

Simple C/C++ Antispyware?
I am not sure such a project exists. The only real and credible open source application I am aware of is the ClamAV project. And that is more AV than AS, I am afraid.








Besides, considering the nature of todays parasitic spyware, it is likely that there won't be any 'simple' applications to combat them.





I wish you the best of luck in finding a suitable project to develop your skills.


C drive not getting formated.?

When I tried to install XP as a fresh copy. I couldn’t able to format my C drive at the starting of the installation. So I installed XP in D drive and after that I forcibly deleted all the contents from C Drive. Now when I try to format C drive, nothing happens. I need to format my C drive coz there is a lot of virus in it. The C drive shows nothing in it but when I see the properties it takes 1.76GB as used space. Please any method or software’s to delete the C drive or format it. I'm ready to re-format my whole PC. Please any help.....

C drive not getting formated.?
create a boot disk with delpart.exe on it. You can download that tool from the internet, just google it. It will wipe anything on your computer.
Reply:I would start over brother, boot from a floppy with killdisk on it, you can get a free version to use:


http://www.download.com/Active-Kill-Disk...


. It will zero out your drive for you with a single pass of 1's and 0's. After which you can boot from the windows cd and reload windows. Make sure you zero the entire drive! Also repair your mbr by running fdisk /mbr from a commandline with a windows boot disk.


C++ Error Using Multiple Files?

Hi!! I'm using Qt 4.2.3, C and C++, and I have these files and their headers:


1. main.cpp:


#include %26lt;QApplication%26gt;


#include "window.h"


#include "register.h"





2. window.h


#ifndef WINDOW_H


#define WINDOW_H


#include %26lt;QWidget%26gt;





3. window.cpp


#include %26lt;QtGui%26gt;


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


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


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


#include %26lt;cstdlib%26gt;


#include "client.c"


#include "register.h"


#include "window.h"





4. register.h


#ifndef PRINCIPAL_H


#define PRINCIPAL_H


#include %26lt;QWidget%26gt;





5. register.cpp


#include %26lt;QtGui%26gt;


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


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


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


#include %26lt;cstdlib%26gt;


#include "client.c"


#include "principal.h"


#include "window.h"





6. client.c


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


#include %26lt;sys/types.h%26gt;


#include %26lt;sys/socket.h%26gt;


#include %26lt;netinet/in.h%26gt; ... etc








When I compile it, I get an error, the compiler complains that these


names are all duplicates. How can I fix it?


In register.cpp and window.cpp I need to use procedures of client.c





Thanks!!!!!

C++ Error Using Multiple Files?
What are you doing, including other source files?





If you need to use functions that are present in other source file, create a header file that declares the existence of those functions, and then include the header file.


Is Visual C++ another language than C++ Or......?

Is Visual C++ another language than C++ Or just a program to write C++ In?





Im Confused here I want to learn c++ But What Do I use to Type the C++ Into and then debug and compile it?





Thanks





And I have Visual C++ Express 2008 Is it the same sa Visual C++ 2008?

Is Visual C++ another language than C++ Or......?
Visual C++ is regular C++ with the added bonus of being able to visually design graphical interfaces for Windows. That's the visual part, it has nothing to do with the programming language.





Visual C++ and the Express version are mostly similar, the differences are subtle, the expensive version contains a few features that enterprises typically need, but the Express versions are incredibly feature packed and good enough for most development, even in commercial enterprises.





Use Visual Studio as the code editor and as a debugger.
Reply:The express versions lack some of the programming tools of the regular versions. Visual C++ is an IDE for the C++ language - and you can program C++ with it.





For hobby programmers, the express version should suffice.
Reply:It's just a program, Microsoft puts it out. They're trying to use the good name "Visual Basic" gave them.

sp

Can some one check foolowing c program and tell me whtat was the mistake i have done?

i try to make a program to enter makers of 5 subject and dispaly the five subject and calculate the gard. but for out put i get the subject mark and for thr grade every subjct i get 'f' , that is not changing if i enter i any number.can some one check it for me.


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


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


#define n 5


char grading(int mark);








void main(void)


{


int mark,c,garde;


int sub[n];


clrscr();


for(c=0;c%26lt;n;c++)


{


printf("\nENTER MARKE FOR SUBJECT %d :",c+1);


scanf("%d",%26amp;sub[c]);


}


for(c=0;c%26lt;n;c++)


{


printf("\nmark for the subject%d is : %d",c+1,sub[c]);


grading(mark);


}


// grading (mark);


}


char grading(int mark)


{


char grade;


if ((mark%26gt;=0)%26amp;%26amp;(mark%26lt;=100));


if(mark%26lt;=60)


printf("f");





else


{


if(mark%26lt;=75)


printf("p");


else


{


if(mark%26lt;=100)


printf("d");


}


}


return(grade);


}

Can some one check foolowing c program and tell me whtat was the mistake i have done?
Judging by your grammar I would say you mistake is probably grammatical. That's without looking at your code.





Please have some common courtesy to spell check your posts!
Reply:Easy.


printf("\nmark for the subject%d is : %d",c+1,sub[c]);


grading(mark);





The variable mark is never assigned a value.


C# or J2EE/J2ME?

I m looking for a career change, which is Gateway to enter software(programming) industry( I m fresher, i know C and c++ to some extent)


Programming Lang


1. a. .NET C# b. J2EE/J2ME c.Testing





if so (considering previous answer)





2. How long does it take to learn and get into the market?





a. %26lt;4months b. %26lt;8 months c. %26gt; 3 years





3. Is Age 24 is too late to enter software Industry?


a. Yes b.No c.May or May not be.





How can i make smooth entry to programming Industry?

C# or J2EE/J2ME?
If you have the time, I would recommend taking the computer science course..it is 2 years long for the certificate, 4 years for the bachelors. It covers all aspects of computers including C++, Java (which you should have for game programming)....etc..


I would recommend ALL of question 1


Question 2: depends on your experience and schooling in the field


Question 3: it's never to late to get into the software industry





Schooling, they will ALL want you to have a background and education in some sort of computer field
Reply:cbkelowna@yahoo.com Report It

Reply:for degree(if u having a deploma for c,c++,etc it'll take atleast 1year





or else if u are startin from beginin it'll take 2 - 2/12 minimam )








( if u wana get into market u can learn just a special language (eg; java / .net )





and u can finish one of tht in 1year or 4months depend on u and strudy time )





ages depend on ur mind


C Programming!?

I know that it is outdated language but because I started with C++ then C# I wish to learn C too..!


What is the "latest" C programming book?


And what is the Best C referece?


What free compilers are availabe for C?


What non-free compilers are available?

C Programming!?
C will never be outdated. Actually i think it's usage grows (but don't ask me for sources).





Free compilers: gnu g++ (unix, linux), mingw (for windows), borland c++ compiler (windows), microsoft visual studio express (windows)





non-free compilers: many more, but why would you want one if you can have gcc for free?





books: i have only one book which is the C reference by k%26amp;r (the previous poster already recommended it, and maybe you can even find it online).





C is very simple compared to C++. It's not difficult to learn if you already know C++. Don't waste your time with books...
Reply:C is not outdated. Report It

Reply:C is not an outdated language, just a good one.





I don't know about "latest" but the best book on the subject is K%26amp;R: http://plan9.bell-labs.com/cm/cs/cbook/





GCC is a common compiler set including a C compiler. Turbo C is another option.


C-sections?

You always hear about everyone having elective c-sections. Why are women now a days electing to have a major surgery than to have a natural delivery? I have had two children naturally and I am hoping to have this baby naturally also. I was close to having a c-section with my daughter, upon hearing this I pushed harder and got her out. I am really afraid of thought of having a c-section. Dont get me wrong I am not agianst c-sections. I think they are great for women who medically need them, expecially when the moms or babys life is in danger. I just don't understand why c-sections are being done just because the mother doesn't want to have a natural birth. When did c-sections become so routine? How do you feel?

C-sections?
My wife has had 3 c-sections. All of which have been medically required.





Having seen that, I cant imagine why people would want to voluntarily have a c-section, with the recovery times, and pain associated with it at that point in time.





I do know, however, that some people schedule it so that they can either get back to work right on a scheduled time, or so that they can schedule time off of work right when the baby is born, and not take the chance that half their time is used just waiting to go in to labor.





Another part is that a lot of people see natural birth as a painful process. They dont see the surgery being as painful, and expect to have pain killers to cover any pain afterwards.





A more vain reason is that they dont want to have a child with a squished head. And yes, Ive heard one woman talk about that as the biggest reason for doing it.





Some doctors will tend to like the c-section option and may push for it, because it allows them to have better control over their own schedule rather than having as many midnight calls for women going in to labor.
Reply:P.S I loved all of the answers and wish I could have picked them all!!!!! Report It

Reply:I think the whole hospital setting makes c-sections more necessary these days. From what I've heard, doctors basically TELL you what you are and are not going to do. There is little freedom of movement, as you are strapped to monitors (internal and external) and IV's. The only way natural birth can happen for some women and some babies' positions, are positions other than laying flat on your back. Whereas, in a home birth or a more lenient hospital you can move around, walk, take a shower or bath, squat, lean, have your husband on the bed supporting your back, etc. you can instinctually get into the best position for you and your baby. Yes, c-sections save lives. But a lot more c-sections could be prevented using alternate birthing positions. Also it is a well-documented fact (read Ina May Gaskin's Guide to Childbirth) that just the entry of a person who the laboring woman does not know or is not comfortable with, can cause the cervix to go from a 10 to a 2. Remember what your mama told you about NOT bothering animals when they are in labor??? Think of the rush and hustle and bustle of all that is going on in the hospital - no wonder labor regresses for so many women. And c-sections become "necessary."
Reply:i am one of that went vag. on my first, c-sec. on second, and thankfully was able to go v-bac on my most recent.


being a mother that has experienced both, i would suggest natural if you can. Recovery time is far less, you bounce back to your prebaby self so much faster.


only positive to the c-sec. would be that it was pre-planned so i was able to prepare for the new arrival.


to each their own story though, the birth of your chid is just a part of the story, it doesn't define who we are as mothers.


Blessings!
Reply:I believe that c-sections have become so popular because of the lack of pain during delivery, the convenience of scheduling a birth, and the speed and relative ease of the operation. Personally, if I had a choice, I wouldn't elect for a c-section. I had an emergency cesarean with my first pregnancy after failing to pass the baby even though I was fully dilated and the baby was in position. Turns out my pelvis isn't big enough so the likelihood of another c-section is about 90% for me. On the plus side, the actual operation was not as horrible as I imagined it would be...it kind of feels like a pen writing on you and there's a lot of pressure when removing the baby. The tricky part is the recovery of course --a week or two having trouble moving around and using the facilities. It's worth it if it means the health and safety of your baby.
Reply:There's a lot of info out there about sex life being less exciting after natural childbirth, which may explain why the "hollywood" types are going for an elective c. They are safe, less mess, they are scheduled just like your manicure and massage, and you can go to the bathroom without pain soon after. I was all for natural Bradley delivery, but had to have an emergency c with my baby girl got stuck and her heart rate was dropping. Honestly, I think I recovered faster than some of my friends who went natural and were quite sore long after... I couldn't do situps for 6 weeks, but everything else was aok. When I have another some day, I'll take another c because I'm not thrilled with the rupture stats on "VBAC" (vaginal birth after c). So, I guess now I am in the elective c category, although I never thought I would be :)

radiata

Fellow C++ programmers out there.... pls help..?

What are some few syntax that are found in Visual C++ 6 that is not found in Turbo Borland C++ 4.5? I am using the old compiler which is Turbo C++ 4.5 and I am used to it. Our company's senior programmer told me that it is cooler to use visual C++ than C++ 4.5? Where to download Visual C++ for free??? Thank you so much in advance...





For those who answered my question about connecting C++ to MySQL, I already found a good site: http://www.cpp-home.com/tutorial.php?22_... Thank you very much also for responding..

Fellow C++ programmers out there.... pls help..?
if you want to be really cool, you have to use gcc :-p





well, turbo C and visual C 6 are both old, and don't implement all facets and details of the C++ standard (which is very big and complex). Also, the standard libraries are a bit different. And therefore the code is not always 100% compatible to the standard, and therefore you have those problems.
Reply:After a lot of research, I obtained free copies of Visual C++ from Microsoft. There was a 64 bit version (that I wanted) in Microsoft Platform SDK for Windows Server 2003 SP1 with 32 bit versions in Microsoft DDK for Windows and Visual C++ Toolkit 2003. These are command line driven and I used my old Watcom software to create/edit source code. See:





http://freespace.virgin.net/roy.longbott...





It seems that things have now changed somewhat but you might still be able to get free copies.


If AB=2x-5 and BC=x+1, then find AB. pls help?

pls help!





If AB=2x-5 and BC=x+1, then find AB.


a.2


b.4


c.6


d.7





If BA=13, BC=2x-3 and AD=5, then find BC.


a.6.5


b.8


c.10


d.13





A man 5 feet 9 inches (5.75 ft) tall casts a shadow 14 feet in length. A nearby building casts a shadow that is 50 feet. How tall is the building?





a.1.61 ft


b.20.5 ft


c.38 ft


d.121.7 ft

If AB=2x-5 and BC=x+1, then find AB. pls help?
bbc


or


bbb?
Reply:Hi,





If AB=2x-5 and BC=x+1, then find AB.





** If B is the midpoint of AC, then AB - BC, so:


2x - 5 = x + 1


x - 5 = 1


x = 6


But this didn't ask for x, it asked for AB.


If x = 6 and AB = 2x - 5, then AB = 2(6) - 5 = 7


This is answer D.





a.2


b.4


c.6


d.7 %26lt;== ANSWER





If BA=13, BC=2x-3 and AD=5, then find BC.





With no picture and 4 letters, A,B,C, and D, I have no idea what you are asking here.





a.6.5


b.8


c.10


d.13





A man 5 feet 9 inches (5.75 ft) tall casts a shadow 14 feet in length. A nearby building casts a shadow that is 50 feet. How tall is the building?





height.....height


---------.=.---------


shadow..shadow





5.75.......x


-------.=.------


14..........50





Cross multiply and solve.





5.75(50) = 14x


287.5 = 14x


20.536 = x


The answer is b, 20.5 feet





a.1.61 ft


b.20.5 ft %26lt;== ANSWER


c.38 ft


d.121.7 ft





I hope those help!! :-)


I have made a c program to find maximum number, but it's not working , can some one tell me whats the wrong .

hear are my program. it is writen to enter a 5 numbers and find the maximum of it. but it's not working. can some one tell me what was the mistake i have done





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


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


int max(int x, int y);


#define n 5


void main (void)


{


int c;


int num[5];


for(c=0;c%26lt;n;c++)


{


printf("\nenter number%d:",c+1);


scanf("%d",%26amp;num[c]);


}


max(num[c],num[c+1]);


printf("\n maximum number is%d:%d",c+1,num[c]);


}


int max(int x, int y)


{


int z;


z=(x%26gt;=y) ? x : y;


return(z);


}

I have made a c program to find maximum number, but it's not working , can some one tell me whats the wrong .
ur not passing the array to the function,


ur just passing two numbers


mostly it is num[0],num[1]


try using two loops


for(i=0;i%26lt;5;i++)


{


for(j=0;j%26lt;i;j++)


{


if(num[i]%26lt;num[j])


---------------------------------


work on these lines
Reply:alright here is ur problem....








ur function int max(int x, int y), is not void, and returns the value of the max between 2 numbers....so





max(num[c],num[c+1]);


printf("\n maximum number is%d:%d",c+1,num[c]);





when u call it right there, nothing is being done with the value returned.....and you need another variable





i'd do something like





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


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


int max(int x, int y);


#define n 5


void main (void)


{


int c;


int num[5];


for(c=0;c%26lt;n;c++)


{


printf("\nenter number%d:",c+1);


scanf("%d",%26amp;num[c]);


}











// assume the first index is the max value


int max_val = num[0];





// i'm assuming you were trying


// to store the index where the max val was found


int max_val_index = 0;





// start i at 1 since, max_val starts with the value


// of num[0]


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


max_val = max(max_val,num[i]);





if(max_val == num[i])


max_val_index = i;





}


printf("\n maximum number is%d:%d",max_val_index,max_val);





}








int max(int x, int y)


{


int z;


z=(x%26gt;=y) ? x : y;


return(z);


}


Let C be a circle and L be a line on the same plane such that C and L do not intersect. Let P be a moving...?

point such that the circle drawn with center at P to touch L also touches C. Then the locus of P is,


A) a straight line parallel to L not intersecting C;


B) a circle concentric with C;


C) a parabola whose focus is the center of C and whose directrix is L;


D) a parabola whose focus is the center of C and whose directrix is a straight line parallel to L;


Kindly explain your answer...

Let C be a circle and L be a line on the same plane such that C and L do not intersect. Let P be a moving...?
Sketch a line and circle on a bit of paper, and a couple of easy possibilities for a point P, to see that options A %26amp; B are not right.





Consider the definition of a parabola - given any focus point F and directrix line G (not touching F), the parabola is the locus of points equidistant from F and G (the distance from G being perpendicular).





Consider each possible point P - the difference between the distance from P to C, and from P to L (perpendicularly) will always be different by the same amount - the radius of C.





So the answer can't be C since P will always be further from C than L, by a distance the same as the radius of C.





So the answer must be D.

medium

Factor the expression. c^3-512?

a]-{c-8}{c^2+8c+64}


b]{c-8}{c^2+8c=64}


c]{c+8}{c^2+8c=64}


d]{c-8{c^2-8c-64}

Factor the expression. c^3-512?
(c-8)(c^2+8c+64) is the answer


C is the answer if you replace the = sign by + sign.
Reply:the best answer is B. when you are factoring an equation thats to the third power theres a trick to it. when its c^3-512 it would be (c-8)(c^2+8c=64)=(c-8)(c^2+8c-64) what ever the symbol is in the first equation would start of in the next on. it it were positibe it would be (c+8)(c^2-8c=64)=(c+8)(c^2-8c-64)





its difference of perfect cubes.
Reply:difference of cubes:





(a^3-b^3)=(a - b)(a^2 + ab + b^2)





if you get stuck with this in a test, i suggest you work backwards and apply the distributive property with each answer.
Reply:This is a difference of perfect cubes since 512 = 8^3. In general, the difference of perfect cubes can be factored as follows:





Consider (c-a)^3 = (c-a)*(c-a)^2 = (c-a)*(c^2-2ac+a^2) = c^3-2ac^2+ca^2-ac^2+2a^2c-a^3 = c^3-3ac^2+3a^2c-a^3. Therefore, upon rearranging terms, c^3-a^3 = (c-a)^3+3ac^2-3a^2c = (c-a)^3 +3ac(c-a) = (c-a)((c-a)^2+3ac) = (c-a)(c^2-2ac+a^2+3ac) = (c-a)*(c^2+ac+a^2) (whew)





In our case, a = 8 and therefore c^3-512 = (c-8)(c^2+8c+64), which I think is answer (b), other than the typo (= instead of +).





Math Rules!


Drop c tuning on guitar?

i've seen drop c tuning a few different ways.... i've seen it like this from string 6 to 1....





C F Bb Eb G C





and i've seen it like this from string 6 to 1





C G C F A D





I'm why learn some bullet for my valentine, the tabs said to tune to drop c, but they didnt say what exactly drop c was. i got dethklok tabs and they had it the first way i put. everywhere else i see has it the 2nd way i put it.

Drop c tuning on guitar?
C G C F A D -- Drop-C is the most common, however, many guitarist mess around with tuning to get a different sound. AC/DC-Its a long way to the top, has the standard EADGBE tuned down about 3/4 step....Why? Because they had to have their guitars in tune with the bagpipes!


Do c-sections pose a greater death risk for both mothers and babies?

I had my daughter via c-section 8 months ago due to the fact i would not dilate past 6 cm. She was born healthy and I have not had any complications recovering, although I am a little sore at my c-section area at times. On google, I was searching for c-sections and second pregnancy because my husband and I will be trying for a second child in a few months. I came across a message board where people were talking about how their babies died after their c-section. Now I am worried. I had no choice but to have a c-section with my first daughter. My Ob told me she would rather me have another c-section with any future pregnancies due to the VBAC risks. This message board really scared me. Is there anything I can do to make during pregnancy to make my c-section go smooth again? I have placed a call to my ob and am waiting to hear back....Am I over reacting?

Do c-sections pose a greater death risk for both mothers and babies?
You'll be fine. I had a c-section too and if I have another baby it will be a c-section again. In your case had you not had a c-section both you and your baby would have died.





Some people are dead set against c-sections for whatever reason. Don't listen to them. It's all scare tactics. There's risk to anything you do in life.
Reply:I think you are over-reacting. People can post anything on the web without the proper facts or sources to back it up. I have never heard of this being a fctor in deaths and I had a C-section myself.
Reply:I have had 2 c-sections and will have my third in March.


As with any surgery there is always a very small chance of something going wrong but with good medical care and a good doctor the chances are so slim that it's not worth stressing over.
Reply:I would be suspicious of your doctor's preference to avoid VBAC. Most of the risks of VBAC were because doctors were inducing or supplementing labor. This has clearly been shown as injurous. C-section, however, is a money maker and more convenient for doctors.





There is always the threat of complications for a c-section, but death to mom or child is uncommon. It is major surgery. 1 in 10 women get an infection. Some are very serious. There are also very serious INJURIES that doctors don't talk about including scalpel injuries to infant (there have been amputations). In fact, on Baby Story just 2 weeks ago, a baby got sliced by the scalpel and needed stitches (they played that down). I am in a high risk group now where c-section is unfortunately, the better choice. I still don't recommend a repeat unless you have a medical reason for not having a VBAC. You are certainly entitled to choose a repeat, but you should check to see if your doctor delivers ANY VBAC patients. Could be her suggestions are not medically based. If you would like a VBAC, consider a second opinion with a doctor that actually does VBAC.





Concerns of uterine rupture are pretty much a non-issue today as labor enhancing drugs cannot be used on women with a prior surgical scar.
Reply:i have had two c-sections, i don't think there is much to worry about its a lot easier to do a planned c-section than an emergency one you'll find that it is less stressful this time I would stress out a lot more doing a VBAC worrying about my uterus rupturing which that can kill both you and the baby. do the planned c-section and you'll have the cutest baby on the Labor and delivery floor less stress for both of you
Reply:I went through these emotions with my second pregnancy. I had an emergency c-section with my first (also stuck at 6cm) and although the recovery went fine, I felt I would really like a VBAC next time around...





Well when that time came I was totally flustered. I researched everything I could about repeat sections (my mum had 3) as well as VBACs. I decided I wanted to try a VBAC and for awhile all was well... until I hit 7-8 months preg and started having doubts/worries/panic attacks. I was totally chickening out. Was I putting my baby at unnecessary risk? Was I being selfish?





In the end I decided to speak to my OB and tell him I wanted a repeat section. Surprisingly, he told me he thought that I would be able to labour safely and was a good candidate for a VBAC. Even more confused, I went home to think it all through one more time... and went into labour 4 days later.





My daughter was born just 1hr 54mins after getting to the hospital. Everything went so blindingly fast, it was immediately apparent that a repeat section would not be necessary. She just popped right out.





But I know I got lucky. I thank my lucky stars everyday, because not everyone has a VBAC and there are risks associated with it, just as there are risks for c-sections.





So I guess I just want to say I have been through both sides of the coin. If I have more kids in future I would like to try VBAC again, but if there is an indication for a repeat c-section I will at least feel comforted that I am in capable hands whatever the risks.





The best advice I could give is to try to relax and educate yourself as much as possible. Read as much as you can to make an informed choice and hopefully you won't end up like me losing sleep at 8 months pregnant for reasons OTHER than having a huge tummy! lol.





All the best!
Reply:There is more of a risk of permanent damage/death with VBAC. A woman who goes to my ob/gyn had one against doc's recommendations, and her uterus ruptured while she was in labor, and she lost a lot of blood, and still had to have a c-section.
Reply:I am sorry, I haven't heard that before. I had a 2nd c-sec. For my son it was crucial and altho born 5 weeks early, he managed quite fine....you see for me, trying to give birth the first time with my daughter my cervix got damaged thanks to the doctor not paying heed to my warnings that I couldn't push and had .5"lip that my daughters head could not push past so because of all the pushing, I had a weakened cervix for the next pregnancy resulting in miscarriage and my last pregnancy I figured b/c of my weak cervix, I'd be able to give birth no problem vaginally (had the suture in and bed rest 20 weeks onwards) but nope had the baby c-section because I couldn't dilate past the 6 cm as well.





The VBAC risks are actually small and supposedly better than getting a c-section second time round but I did it and it's fine. Only think is the scar tissue build up grows and may complicate future pregnancies...for me that wasn't a problem b/c I can't have anymore anyway.





Good luck.
Reply:A lot of women have c sections and their babies are fine. The only thing to worry about is if you have an emergency c section - which means you or the baby is at risk of complications. So if it's just because you weren't dialating correctly, it'll be fine.


Can anybody translate "C`est la vie" by Jean Michel Jarre ? I don`t mean the lyrics in French.?

tintén


alfen fi yomén


whispers and cries


aah! min zaman


it's all happening too fast


ya leyli, ya haiati





aah! when was all this?


when that all began?


when will it end?


aah!


ya... ya leyl... ya...


c'est la vie





kan, min zaman, min zaman,


min zaman





refrain:


kan fi zaman, min zaman, ya zaman


sabatalef sana wa el wakt gambina


sabatalef sana wa el wakt waktina





ya... ya... haiati...


i love you so much


it's going too fast


ana bahebak awi


el haiati


c'est la vie


c'est la vie


ya... ya... ya... ya... ya...





repeat refrain





aaah!


sabatalef sana wa el wakt waktina


ya... ya...


sabatalef sana wa el wakt gambina


sabatalef sana wa el wakt waktina





flesh, all dust, all


yekoun, yekoun


love and tears


c'est la vie





sabatalef sana wa el wakt waktina


sabatalef sana wa el wakt gambina


mmm... yekoun... aaaahh!


c'est la vie


ya... toul omri, ya haiati, aaah!


c'est la vie


aaah! aaah! aaah! aaah! aaah!


ya leyl... ya... ya... ya... dounia


aaah!





c'est la vie


ya leyl, ya leyl


ya... ya... ya...


ya habibi


aaaahh!


c'est la vie, ya...


aaah! aaah!


whispers and cries


ed dounia kéda


ya dounia helwa


c'est la vie





Can you tell me which language it is ?





thanks

Can anybody translate "C`est la vie" by Jean Michel Jarre ? I don`t mean the lyrics in French.?
The only French line in the song is, 'C'est la vie'





The rest is in Arabic and English.





For example the part:


ya... ya... haiati...


i love you so much


it's going too fast


ana bahebak awi


el haiati


c'est la vie


c'est la vie





means





my life


I love you so much


it's going too fast


I love you a lot


the life


it is the life


it is the life





I can't be bothered to translate it all but I'll just translate some words quickly:


ya leyl - the nights


sabatalef sana wa el wakt waktina - 7 thousand years and the time is our time


sabatalef sana wa el wakt gambina - 7 thousand years and the time is by our sides


ya dounia helwa - the pretty world





Hope I've helped you!
Reply:"Such a life!"
Reply:The title is French and it means "That is life." That is all I know. The lyrics seem like they are in a different language though.

cvs

Is C and C++ a dead programming language?

I got very lucky and got hired on with a company that's willing to train me as a Web Developer and Programmer. I'm still a freshman in college doing a double major of Computer Programming and Japanese.





I don't know much, yet, about programming, but before going in to school, on my own research, I heard the countless things that could be done with C++ and moreso important because I want to, eventually, do game programming.





Well I got into a HUGE fight with the lady training me because she said that C++ was dead and that the only languages anyone needs, or should learn, are .NET languages (which I'm currently being taught at work, alongside my C and C++ classes)





I dont want to believe that its a dead language or believe in her claim that anything that can be done in C++ can be done better with a .NET language, and that Microsoft (our vendor) doesn't use C++ in anything anymore.





Is it true that the language is dead? I'd like some help, preferably some articles, on the matter. Thanks

Is C and C++ a dead programming language?
If you want to see how valuable a language is, go to hiring sites like monster.com and dice.com. Take a look at how many offerings are using the language.





For applications that are primarily C and C++:


Windows Kernel


Linux kernel


other unix kernel


vast majority of embedded work is in C, with some C++, followed by assembler and other languages. In fact, this is the area I expect to become the biggest arena. As we get more and more small ubiquitous devices, they will need embedded software.





I work in data acquisition software, writing drivers and communication layers. I primarily use C++ and it is not going away anytime soon.





I find learning C and C++ very useful, because it's closer to the hardware and now I understand things like pointers, indirection and memory management much better than if I had just learned C# or Java.





I don't claim that .NET languages or Java are bad. They all have their uses. Mainly it is what you are interested in. It's always good to know more than one language. Still, ignore people with language religion. Anyone who tells you they have the one true path is full of baloney.
Reply:It is extremely flexible in its ability to solve problems from basic buiness applications to complex scientific applications. This wide range of applications make it a popular language in education and the business world.





The C++ programming language is used to develop a wide range of applications. It can be used by any local business to write a program to do their payroll or solve some other business problem requiring a custom built solution. It may be used by a software developer to create a commerical package for a common application like a word processor or an accounts receivable package. It is also used in Government, Miliatary, aerospace and the scientific community. Most engineering majors are required to take a course in C++ programming as it is widely used in engineering applications.
Reply:C++, being an OOPs language, is the successor to C for intensive application (such as games and back-end applications). Incidentally, I believe Microsoft C++ is one of their .NET Languages. Since Visual Studio 2005, Microsoft dropped the .NET nomenclature from Visual Studio, but Visual Studio 2005 (and the new Visual Studio 2008) supports C++, Visual Basic (which has becomes more fully Object Oriented) which are suitable for compute intensive game programs and back-end service services which run on a server to support light web-browser based applications written in C# , J#, JScript and ASP.NET.





The Web-browser based applications has to be light-weight because many PCs are low power for financial reasons, and most laptops are low-power for long battery-life. This put a lot of load on the server applications supporting the web-based applications (like network games). I think Google is pushing a business model where the user pays a monthly fee to use the storage, server-based programs and compute power of their servers.





Bottom line seems to be there should be lots of need for both type of programming languages.
Reply:C and C++ are NOT going anywhere anytime soon. You may use other languages for certain things but you will need C and C++ skills for a long time to come. The person training you is obviously living in a Windows only world. At my last company we used primarily various flavors of UNIX for image processing. Every time someone brought up using Java or some other language to do the work, we'd code it up and the customers would complain that it was too slow. I currently work in real-time processing and we stick with C and C++ due to the speed required, etc. Game programming will definitely require a good knowledge of C and C++.
Reply:She is right, web applications are hot right now but only in the business world I believe. Doing work through Windows default IE web browser is better than having to install executables and then hoping each machine will work with it. I honestly think web applications function better with SQL as well.
Reply:First of all, good for you for sticking up to the teacher :)


Second, you are right and your teacher is dead wrong. In today's world, the only place where you won't need to know C or some variant of it is if you're doing web programming, or writing apps for phones or pdas. Just about every application on your computer right now was coded in C. That your teacher believes C is dead is just ridiculous. You're right about having to know C for game programming. No other language comes close to the power that C has for low level/hardware programming. Modern games have to hook into graphics cards and make lots of system calls, and if you don't know C you're going to be running at 2 frames per second.
Reply:Im a computer science major and i had to take C and C++ , i will say that they are the best and more comfortable and easy prog languages i ever study.
Reply:What she is on about with console applications is rubbish, using QT alongside C++ is amazing you can make awesome interfaces she probably didnt get that far into learning C++ she did hello world and deciede to go back to her protective windblows machine, if C is dying then why is it still used to make 90% or more of todays OS's she is loopy show her what you can do with C++ and that should shut her up


C++ programming question?

Hi





In the code below i want to make it so that the user can enter 2 numbers but when i run the program the program will allow the user to enter only 1 number, even the code to enter a second number is present. I am not sure what i am doing wrong. Please do help!!!





#include %26lt;iostream%26gt;





using namespace std;





class Complex


{


public:


friend ostream %26amp;operator%26lt;%26lt;(ostream%26amp;, const Complex %26amp;);


friend istream %26amp;operator%26gt;%26gt;(istream%26amp;, Complex %26amp;);





private:


float real;


float imaginary;


};





ostream %26amp;operator%26lt;%26lt;(ostream %26amp;output, const Complex %26amp;c)


{


output %26lt;%26lt; c.real %26lt;%26lt; c.imaginary %26lt;%26lt; "i";


return output;


}





istream %26amp;operator%26gt;%26gt;(istream %26amp;input, Complex %26amp;c)


{


input %26gt;%26gt; c.real;


input.ignore();


input %26gt;%26gt; c.imaginary;





return input;


}





int main()


{


Complex number1, number2;





cout%26lt;%26lt;"Enter 1st number";


cin%26gt;%26gt;number1 %26gt;%26gt; number2;





cout%26lt;%26lt;"Enter 2nd number";


cin%26gt;%26gt;number2;





return 0;


}





I tried it doing two ways as you can see above


Thank you

C++ programming question?
I only modified main() like so:





int main()


{


Complex number1, number2;





cout%26lt;%26lt;"Enter 1st number: ";


cin %26gt;%26gt; number1;





cout%26lt;%26lt;"Enter 2nd number: ";


cin%26gt;%26gt; number2;


return 0;


}





Compiled OK, no warnings or errors.





Behavior: At run time, I had sucess, but I had to enter two numbers, each followed by return key at each prompt.


"Enter 1st number: " %26lt;I entered: 3, %26lt;enter key%26gt; I entered 4, %26lt;enter key%26gt;


Enter 2nd number: " %26lt;same again like above%26gt;





So... I had to enter 4 numbers total. Now, why is that?





I think it's because of this class implementation code portion:


istream %26amp;operator%26gt;%26gt;(istream %26amp;input, Complex %26amp;c)


{


input %26gt;%26gt; c.real;


input.ignore();


input %26gt;%26gt; c.imaginary;


}





See? Looks like there are 2 inputs for numbers there. This might explain it. cin is doing it's job based on the way the class is coded, ie: 2 inputs needed per cin prompt, when the object is handed to cin like so:





cin%26gt;%26gt;number1;





So, interesting, i think the runtime behavior is as coded and well-defined, just not what you expected...





...good luck...





EDIT: Outstanding! I see you got the rest/fix on your own! Good job, you!


If a,b,c,d are real numbers such that b > 0, d > 0 and a/b < c/d, then only one of the following ...?

statements is always correct. Which one is it?


A) a/b %26lt; (a-c)/(b-d) %26lt; c/d;


B) a/b %26lt; (a+c)/(b+d) %26lt; c/d;


C) a/b %26lt; (a-c)/(b+d) %26lt; c/d;


D) a/b %26lt; (a+c)/(b-d) %26lt; c/d;


Explain your answer...

If a,b,c,d are real numbers such that b %26gt; 0, d %26gt; 0 and a/b %26lt; c/d, then only one of the following ...?
a/b %26lt; c/d =%26gt;


ad %26lt; bc =%26gt;


ab + ad %26lt; ab + bc =%26gt;


a(b + d) %26lt; b(a + c) =%26gt;


a/b %26lt; (a + c) / (b + d)





Also,


a/b %26lt; c/d =%26gt;


ad %26lt; bc =%26gt;


ad + cd %26lt; bc + cd =%26gt;


d(a + c) %26lt; c(b + d) =%26gt;


(a+c)/(b+d) %26lt; c/d





So B is correct.


If a,b,c,d are real numbers such that b > 0, d > 0 and a/b < c/d, then only one of the following ...?

statements is always correct. Which one is it?


A) a/b %26lt; (a-c)/(b-d) %26lt; c/d;


B) a/b %26lt; (a+c)/(b+d) %26lt; c/d;


C) a/b %26lt; (a-c)/(b+d) %26lt; c/d;


D) a/b %26lt; (a+c)/(b-d) %26lt; c/d;


Explain your answer...

If a,b,c,d are real numbers such that b %26gt; 0, d %26gt; 0 and a/b %26lt; c/d, then only one of the following ...?
a/b %26lt; c/d =%26gt;


ad %26lt; bc =%26gt;


ab + ad %26lt; ab + bc =%26gt;


a(b + d) %26lt; b(a + c) =%26gt;


a/b %26lt; (a + c) / (b + d)





Also,


a/b %26lt; c/d =%26gt;


ad %26lt; bc =%26gt;


ad + cd %26lt; bc + cd =%26gt;


d(a + c) %26lt; c(b + d) =%26gt;


(a+c)/(b+d) %26lt; c/d





So B is correct.

gardenia

Output of a C++ program?

#include %26lt;iostream%26gt;


using namespace std;


int main()


{


int a = 6, b = 6, c = 20;





if (a++ %26lt;= --b %26amp;%26amp; c != b)


c += 5;


else if (a %26gt;= ++b)


c = a++ * b-- + 3;


else


c += 50;





c = a + b + c - 10;





cout %26lt;%26lt; "a = " %26lt;%26lt; a %26lt;%26lt; endl;


cout %26lt;%26lt; "b = " %26lt;%26lt; b %26lt;%26lt; endl;


cout %26lt;%26lt; "c = " %26lt;%26lt; c %26lt;%26lt; endl;





return 0;


}





Can someone explain to me why the output of a,b, and c is 8,5,and 48 respectively?

Output of a C++ program?
we come to


if (a++ %26lt;= --b %26amp;%26amp; c != b)





first b is pre-decremented


now a=6 b=5 c=20





now the "if" expression is evaluated, which, translates to


(6 %26lt;= 5 %26amp;%26amp; 20 != 5)


which evaluates to false





now the post-increment on a is applied


now a=7 b=5 c=20





since the "if" evaluated false, we now evalutate the "else if"...





first b is pre-incremented


now a=7 b=6 c=20





now the expression is evaluated, which, translates to


(7 %26gt;= 6)


which is true, so we execute the line of code


c = a++ * b-- + 3;


which translates too


c = 7*6+3


now a=7 b=6 c=45


now the post-increment on a is applied, and, the post-decrement on b is applied.


now a=8 b=5 c=45





the "else" is skipped





now c = a + b + c - 10 is executed, which, translates to


c = 8 + 5 + 45 - 10


now a=8 b=5 c=48


C# or C++ for game development?

I have experience both in C++ and C# (not in game programming though) and it seems that C++ is still considered the stanadared programming langauge for game development. But it also seems that with the release of XNA that C# is slowly starting to become the next main stream game development language of choice. I was going to start creating a game and even though I enjoy C++ I have become very fond of C#, because so much code has already been done for you (thank you .NET). Which should I use to start developing my game?

C# or C++ for game development?
definitely C++. C# has no where near the power as C++. the only real reason microsoft is allowing people to use C# for their 360 programming XNA stuff is because it is so weak and limited and will make hacks and such harder to create. personally, i prefer java XD
Reply:.net is far fast development and C,C++,C# are far professionals...............


like i ve developed games in C(16 bit) and VB although VB games look ool but are not very tough to develop but games in C takes hard work see them @ my site


http://pannitan.googlepages.co... Report It

Reply:What kind of game? For FPS (3D shooters) and simulators definitely C++, for puzzle games like Tetris, Chuzzle C# is more preferable.


Another problem is software protection - if you create a shareware game then you should use C++ because you can not protect C# application from reverse engineering.
Reply:You can use either for game development. Some points people raise:





C++ is faster: Technically C++ is faster than C#. Consider the following, though. C# has a very good JIT compiler. To match the optimizations from C#, C++ itself needs to optimize properly. But with C++, you distribute pre-compiled code, which means you don't optimize as accurately and effectively as the JIT compiler, unless you decide that your program only runs on so and so type of processor. So C# is comparable or sometimes better than C++.





Properly optimized C++ code will still win, and this is usually in something low level like OS programming, drivers, and APIs between hardware and software. But with game development, you aren't making drivers or APIs. Rather, you are just using them.





Available libraries: People say C++ has more libraries for use. Yeah, or to be more accurate, C has more libraries. And given that C has been around for so long, that's obvious. C# is quite recent, and even then, it has a number of supporting libraries for game development. Many libraries and APIs for C/C++ have already extended support to C#. Pretty impressive.





C# is definitely becoming a language of choice. Actually, modern C++ has very powerful generic programming semantics, but any serious and advanced C++ programmer should be able to appreciate the usefulness of C#. It's a modern language with modern semantics, with points like documentation and unit testing in mind.





So again, either one.
Reply:C++, and not .Net...you'll never get the performance out of the .Net framework...





.Net framework is good for productivity apps and so on, but high performance it is not...


Where did C go?!?

Take the equation below, trace the steps, and tell me what happened to variable C.





A = B + C (multiply both sides by (A - B))





A(A - B) = (A - B)(B + C) (multiply this out)





A^2 - AB = AB + AC - B^2 - BC (now subtract AC from both sides)





A^2 - AB - AC = AB - B^2 - BC (now simply each side by factoring)





A(A - B - C) = B(A - B - C) (now divide both sides by (A - B - C)





A = B (what happened to C?! My original equation stated that A = B + C, not that A = B. Where did C go?)

Where did C go?!?
If A = B + C, then A - B = C, and (A - B - C) = C - C = 0, and you have ended up dividing by 0 which is not allowed.
Reply:Hi,


in your original equation:


A=B+C or A-B=C


At the end of the statements,


In short, you are saying


A=B


=%26gt; A-B=0 or =C=0





you need to think that...
Reply:You are dividing by zero





(A - B - C) = 0





Since





A = B + C





Hence,





A - B - C = 0





When you divide by zero, you can equate anything.


{Hence the answer is indeterministic and not useful}








A (A - B - C) = B (A - B - C)





A (0) = B (0)





e.g. 123 (0) = 4 (0) is also true.





You can then claim,





123 = 4


{obviously, this is false}





The value of C when A = B, is C = 0.





But this is immaterial since A = B is erroneous in the first place when you divide by zero by cancelling out the term (A - B - C).
Reply:The answer is simple A-B-C=0 .


you mustn't divide by 0.
Reply:It's magic...





HAHAHAHA... just kidding...





You can't just divide the (A-B-C) because according to the first equation, A= B+C.





Rearrange this equation, A-B = C, once more... A-B-C = 0





And you can't divide by a zero...
Reply:You can't divide by 0 in mathematics.





A = B + C,


so A - B - C = 0.





Not allowed. Bad bad bad. Don't do it.
Reply:home


Let C^infinity denote the vector space of all functions f : R-->R whose derivatives f^n exist for all n>=0.

Prove or disprove that it is a linear transformation


a) T : R^2 --%26gt;R^2 with T(x,y) = (x - y, 1 - y + x)





b) T : C^infinity --%26gt; C^ infinity with T(f) = f" - 3f' + 2f.





c) T : C^infinity --%26gt; R where T(f) = f(2).





d) T : C^infinity --%26gt; C^infinity where T(f) = the integral form 0 to x of f(t) dt + 1.





e) T : C^infinity --%26gt; C^infinity with T(f) = f(x + 1)

Let C^infinity denote the vector space of all functions f : R--%26gt;R whose derivatives f^n exist for all n%26gt;=0.
I'm not too sure about these, but here goes:





If any of these are linear transformations, we must have


T(f+g)=T(f)+T(g)


T(af)=a*T(f)


for all functions f and g in C^inf and scalars a.





a) Well, this one isn't about our functions yet. The same basic thing applies though:


T( (x,y) + (u,v) ) = T( (x+u,y+v) ) = (x+u-y-v, 1-y-v+x+u)


= (x-y, 1-y+x) + (u-v, -v+u).


But we cannot get another 1 into the second ordered pair to obtain T((x,y))+T((u,v)), so this is not linear.





b) This one is linear, following from the linear properties of the derivative:


T(f+g) = (f+g)'' - 3(f+g)' + 2(f+g)


= f'' + g'' - 3f' - 3g' + 2f + 2g = f''-3f'+2f + g''-3g'+2g = T(f)+T(g)


T(af) = (af)'' - 3(af)' + 2(af) = af'' - 3af' + 2af = a*T(f)





c) This is linear as well, and follows rather simply from the definition of sums and scalar products of functions. I'll leave the details to you.





d) This fails because of the +1:


T(f+g) = int( (f+g)(t) ) + 1 = int( f(t)+g(t) ) +1


= int(f(t)) + int(g(t)) + 1


and we have our problem.





e) Linear again:


T(f+g) = (f+g)(x+1) = f(x+1)+g(x+1) = T(f)+T(g)


T(af) = (af)(x+1) = a*f(x+1) = a*T(f).





If you notice anything wrong in what I've done (this goes for other answerers as well obviously), please let me know.





Cheers!

aster

Help in C regarding in filtering?

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





main()


{


int a=0, b=0, c, d, e;





clrscr();


for (c=1; c%26lt;=10; c++)


{


printf("%d + %d = ", c, c);


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








e=c+c;








if (d==e)


{





printf("Right!\n");


a++;


}


else


{


printf("Sorry your answer is wrong. The answer is %d\n", e);


b++;


}


}





printf("\nThe total right answer(s) is %d", a);


printf("\nThe total wrong answer(s) is %d", b);


getch();


}





this program add numbers up to 10...


how can i add a filter that will end the program if i type an alphabet ???


tnx C masters!!!

Help in C regarding in filtering?
This question is an exact duplicate of the question below.


Which is most appropriate? C language. Please read fully?

This


main()


{


int c;


c = getchar();


while (c != EOF) {


putchar(c);


c = getchar();


}


}








or





main()


{


int c;


while (c != EOF) {


c = getchar();


putchar(c);


}


}


*****************************


only change being getchar(); is not used outside loop.


I just wanted to know which is better.


in the first case we are using same statement outside loop and we are not putting EOF character in file(assume that its a file)


The later case is straight forward; here we are putting character into file and then we are checking for EOF. The only problem being c in not initialized. This problem can be solved by setting c=0 or so when its declared.


But i want to know which is better among there.


Please no jokes :)


thanks

Which is most appropriate? C language. Please read fully?
I would go with the second one, You are going to enter the loop even if the value of C is not declared until the loop has been entered. I would have to say there is a 1 in a 99999999999 chance that the deceleration of int c is going to be assigned the value of EOF when it is declared (if i remember right, as soon as your compiler reads int c, there is a random value assigned to it) ........however (i'm more of a C++ man) i'm pretty sure this is legal in C++ and prolly C





main()


{


while(getchar() != EOF){


putchar(getchar());


}:





};





i'm not %100 on this (cuz i'm drunk) but getchar() is going to return a value, because it is not calling by reference, so if you are setting C = to the value returned by the function getchar, why not just throw the method ghetchar() in the parameter??? the compiler is going to look at the value returned by getchar() before the function....(ex: if x = 1 (before the function call) random_function(++x) is going to take the value 2......








If I was you, I would try and get rid of the variable C....
Reply:In the first program, you check for an EOF after the getchar() function, but before the putchar() function.





The second program 'gets' a character and 'puts' it before checking for the EOF. So, the place where you're putting the characters will also get the EOF tacked onto the end. Also, you need to initialize the 'c' variable.





If you want the EOF included (as if you were outputting text to a file), then you need to add an extra putchar() function after the 'while' loop in the first program.


If you want the EOF included, but you're not sure which program is more efficient, then I can't tell you which program is more efficient. Without re-writing the 'while' loop in the program (like a couple other answerers correctly did), one program uses an extra getchar() and the other program would use an extra putchar() - it is a case of whether getchar() has more code overhead than putchar(). The only way to find out would be to disassemble both functions. I know Assembly language, so I can do this, but I don't feel like doing it right now.


Ha Ha.
Reply:this one is better than above 2 programs:





main()


{


int c;


while ((c = getchar()) != EOF)


{


putchar(c);


}


}
Reply:For a bit of an explanation try this -


C++ Kicking my butt?

Ok I have a Car, Truck and Senior. I have to input C for Car, T for Truck, S for Senior. Our instructor wants us to input the the One letter but show the whole word.





So I did


cout%26lt;%26lt;" Type.....";


cin%26gt;%26gt; type ;





From here I punch in C, and only C shows up. How can i punch in C, but have Car show up instead??? Is that possible





Someone suggest the switch statement, but it didn't work plus that is a little to advanced for where are class is now. All I can get is inputting C, just the letter C comes out. I did something with an if statement and Cars came out on the next line.





I want to punch in C but when I hit enter I don't want it to be there, just the word Car, Truck or Senior. Any help

C++ Kicking my butt?
I'm not exactly sure if I understand what your problem is...but based on what I think it is this is what I would do...





cout%26lt;%26lt;"Type....."; (assuming this means u want them to type in something)


cin%26gt;%26gt;type; (assuming you've declared type already)





if(type == 'c' || type == 'C') {


cout%26gt;%26gt;"Car";


else if (type == "t" || type == "T")


cout%26gt;%26gt;"Truck";


else if (type == "s" || type == "S")


cout%26gt;%26gt;"Senior";


}//end if





of course if you want it to say more than just car, or truck...you would say something like cout%26gt;%26gt;"The type is car" or something....hope that helps...if not, just clarify a bit more and I'll try to help
Reply:What you are dealing with, is a translation of a character to something else. Basically...





1) get the letter input from keyboard


2) if what you get = 'c' then print "car"


3) if what you get = 't' then print "truck"


4) if what you get is anything else, print "error"





Obviously, you have to do all these in C syntax. If you don't want to use the case statement, use if statement.
Reply:when you find the answer, let me know...
Reply:%26gt; From here I punch in C, and only C shows up. How can i punch in C, but have Car show up instead???


You mean to say, you want the letter C to be **replaced** by Cars? Not going to happen. Either you’ll need OS specific stuff like ncurses, or OS specific stuff in GUIs. Either way, I suggest you drop what you are trying to do.





All you need to do is basically have it output the appropriate word for the letter (Cars for C, Truck for T, etc.). If statements are one way, but a switch statement may be more appropriate. A lookup table may be useful, especially with something like std::map.
Reply:I think I found the answer. At the top of the file, type:


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





And then, if the variable you store the character in is called "input", instead of:


cin %26gt;%26gt; input;


Do this:


input = getch();





This reads the character as soon as its typed, and doesn't wait for the user to press [ENTER], moving you onto the next line.
Reply:Sure, try this:





cin %26gt;%26gt; type;





switch (type) {


case 'C' : cout %26lt;%26lt; "Car" %26lt;%26lt; endl; break;


case 'T' : cout %26lt;%26lt; "Truck" %26lt;%26lt; endl; break;


case 'S' : cout %26lt;%26lt; "Senior" %26lt;%26lt; endl; break;


}





Switch statements are very handy for single-character input.


C++ EXPERTS!! HELP!! Please??

I use:





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





main()


{


cout %26lt;%26lt; "Hello World!";


return 0;


}





In MS Visual C++ and always get the same error!!





1%26gt;c:\documents and settings\c j smith\my documents\visual studio 2005\projects\test\test\test.cpp(6) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory


1%26gt;Build log was saved at "file://c:\Documents and Settings\c j smith\My Documents\Visual Studio 2005\Projects\test\test\Debug\BuildLog.h...


1%26gt;test - 1 error(s), 0 warning(s)


========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========





And a pop up?





Unable to start program c:\documents and settings c j smith\my documents\visual studio 2005\projects\test\debug\test/exe.





The system cannot find the file specified.





PLEASE HELP!

C++ EXPERTS!! HELP!! Please??
It should be this:





#include %26lt;iostream%26gt;





using namespace std;





int main()


{


cout %26lt;%26lt; "Hello World!";


return 0;


}
Reply:The ".h" in "iostream.h" is archaic and should not be used. That line should read:





#include %26lt;iostream%26gt;





Also, you might want to give main() a type.... int main() and void main() are both acceptable.

marigold

C++??!! experts in C++ help me fast I don't have time :1 day?

You have the following program:


//Combined.cpp





class A {


int i;


public:


A(int ii) : i(ii) {}


~A() {}


void f() const {}


};





class B {


int i;


public:


B(int ii) : i(ii) {}


~B() {}


void f() const {}


};





class C : public B {


A a;


public:


C(int ii) : B(ii), a(ii) {}


~C() {} // Calls ~A() and ~B()


void f() const { // Redefinition


a.f();


B::f();


}


};





int main() {


C c(47);


} ///:~


1. Modify Combined.cpp to add another level of inheritance and a new member object. Add code to show when the constructors and destructors are being called.





2. In Combined.cpp, create a class D that inherits from B and has a member object of class C. Add code to show when the constructors and destructors are being called.

C++??!! experts in C++ help me fast I don't have time :1 day?
No kidding. Your solution is here





http://www.mindview.net/Books/TICPP/Solu...





It costs $12 though. But your teacher might probably use the question from this book again later. So, I guess it's worth to buy.





Your qutestion is here


http://web.mit.edu/merolish/ticpp/Chapte...
Reply:You can find many live C++ expert at websites like http://getafreelnacer.com/
Reply:with the same concept i can give u in java ... do u need them !!!


In c++ how do you output CSI?

how do i use the c to form a c,an s to form an s,and a i to form an i. and you have to prompt the user to input which character should be used to form each letter of the banner. thanks for all the help.


it should look somrthing like this. sorry, its not straight but the c should come together to form a c and the s should form an s, etc... thanks again.!!!





ccc ssss i


c s i


c ssss i


c s i


c ssss i

In c++ how do you output CSI?
I'd recommend checking out the "figlet" source (open source, academic license) over at figlet.org - this does what you're asking and more. Look at the example fonts, especially alphabet and letters fonts, for the effect you want.





Use the last link below to test it out.
Reply:The most important thing is to use a non-proportional (fixed) font, that is, a font where a W takes ip just as much space as an i.





After that, it shouldn't be too hard...


C program inside?

10 points to whoever can help me fix this.bear in mind I've absolutely no idea how rand works(that's the reason I'm here)





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


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


#define num 4


int main()


{


int a,b,c;


int vect[num],i;


int x,y,n;





printf(" Introduzca numero de jugadas ");


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


printf(" Introduzca monto del cual dispone ");


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





do{ y--; printf(" \nLe quedan %d jugadas\n",y);


for(i=0;i%26lt;num;i++){


vect[i]=rand() % 10;


a=vect[i];b=vect[i];c=vect[i];


}


if(a==b%26amp;%26amp;a==c){


x=2*x; printf(" Ganaste el triple\n ");


}


else if(a==b%26amp;%26amp;a!=c){


x=(3/2)*x; printf(" Ganaste el doble\n ");


}


else if(a=!b%26amp;%26amp;a==c){


x=(3/2)*x; printf(" Ganaste el doble\n ");


}


else if(b==c%26amp;%26amp;b!=a){


x=(3/2)*x; printf(" Ganaste el doble\n ");


}


else if(b!=c%26amp;%26amp;b!=a){


x=(x/2); printf(" Perdiste\n ");


}


while(y%26gt;0%26amp;%26amp;x%26gt;1);


system("pause");





}

C program inside?
I made some changes, and tried to add comments to explain what I did. Hopefully this helps some.








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


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





//needed for the line below where we seed


//the random number generator


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





#define num 4


int main()


{


int a,b,c;


int vect[num],i;


int x,y,n;





//otherwise it will generate exactly the


//same "random" numbers every time


srand(time(0));





printf(" Introduzca numero de jugadas ");


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


printf(" Introduzca monto del cual dispone ");


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





do{ y--; printf(" \nLe quedan %d jugadas\n",y);


for(i=0;i%26lt;num;i++){


vect[i]=rand() % 10;


//a, b, and c all ended up with the same value,


//the last random number you generated


}





//moved this outside the loop


//so they don't all have the same value


a = vect[0];


b = vect[1];


c = vect[2];





if(a==b%26amp;%26amp;a==c){


x=2*x; printf(" Ganaste el triple\n ");


}


else if(a==b%26amp;%26amp;a!=c){


x=(3/2)*x; printf(" Ganaste el doble\n ");


}


else if(a=!b%26amp;%26amp;a==c){


x=(3/2)*x; printf(" Ganaste el doble\n ");


}


else if(b==c%26amp;%26amp;b!=a){


x=(3/2)*x; printf(" Ganaste el doble\n ");


}


else if(b!=c%26amp;%26amp;b!=a){


x=(x/2); printf(" Perdiste\n ");


}


}//added a } that was missing


while(y%26gt;0%26amp;%26amp;x%26gt;1);


system("pause");





}
Reply:I am guessing you are asking about this line...





vect[i]=rand() % 10;





rand() returns a random number 0 to 2147483647





% 10 says divide by 10 and give me the remainder, so vect[i] value will get a value 0-9





you do have an error further down also...





3/2 is 1 in integer math. so x is just going to be x after each time you do this (3/2)*x, x is always same as when you started.





also your if statement is over complex...





if(a==b%26amp;%26amp;a==c){ /* if all are the same */


x=2*x; printf(" Ganaste el triple\n ");


}


else if(a==b || b==c || a==c){ /* else if 2 are the same */


x=(3*x)/2; printf(" Ganaste el doble\n ");


}


else { /* else none are the same */


x=(x/2); printf(" Perdiste\n ");


}





the else if you know all three are not equal already because they would have been found in the if...
Reply:rand() is a random number generator function. To make it really random, you need to call the srand function before.


C&c cage for guinea pigs?

hey, i've got 4 guinea pigs and i'm currently keeping them in a pet-shop cage which is too small... i've researched on-line and found c%26amp;c cages which are like much more spacious. i live in singapore and i'm wondering where i can get the materials to make my own c%26amp;c cage or best, buy a ready-made one.





does anyone know how big the cage should be for 4 piggies? you know, the number of grids for the length and breadth. and can i attach a hay rack for a c%26amp;c cage? i really need some good advice as i'm a first timer.





by the way, does anyone know what's the best bedding to use for guinea pigs? i'm using newspaper currently and i have to change it twice a day. i heard carefresh is the best, but i also heard that it's a bit dusty. i'm not getting the ultra ones because they are not ecomonical and too expensive! one question though, when you clean out the cage like once a week, does the carefresh feel damp and musty or does it feel dry like the package claims? i need some advice. thanks.

C%26amp;c cage for guinea pigs?
http://www.guineapigcages.com/


Try this site. I found it to be very helpful with all the research needed in keeping piggies as pets.





You can order premade ones of of that site, ebay and you can order the supplies needed off line.





As for bedding, I don't suggest continueing with the newspaper because if they eat it, they can get ill from the ink or things on the paper. Carefresh can be a little musky and heavy, but should only be that way where they have gone to the bathroom. I suggest a hay, timothy and alfalfa work best, preferably something that is edible, not the straw found on hay rides.





And hay racks. you can get creative and fashion one from remaining peices of the grid or you can zip-tie or twisty-tie one onto the side. It makes to difference to the piggies.





Also, you may want to make or buy a 2 story house. You can make the bottom smaller that way, but they'd still have plenty of room.





Have fun with your new piggies and good luck finding what you need.
Reply:http://www.guineapigcages.com/





Try this site it should give you some ideas. I used aspen pine bedding. I know that your not supposed to use cedar or pine because of the oils. Its been a while since I had a pig but good luck.
Reply:http://www.guineapigcages.com/buycc.htm


i will probably be getting mine off of here and i will be getting two...


or this site


http://www.guineapigcages.com/

dracaena