and what is the difference among them
What is C Programming,C++Programing,visu... and Java?
Most programming languages like the ones above have the same basic principals but there syntax varies. Visual Basic is by far the easiest and best way to make a nice looking GUI application. Java is better for websites. C++ is just a new version of C i've never used it but i've seen the syntax and it is based on java. C++ is mainly used in video game design but it can be used for other things as well.
Reply:C is a programming language in which software are developed
C++ is the next version of C and is not structured like C. This is the only difference between C and C++.
The latest version is C ##
Java is the script and is case sensitive, VB is the another script and is used for making GUI whereas Java is for developing the embedded programmes
Nowadays these are the programming lanuages which are being used by most of the developers. The latest revolution is Dotnet
blue flowers
Friday, May 21, 2010
How can i convert from charater to integer in c++ programming languge?
i want a code to convert between the character datatype and the integer data type in c++ programming languge
How can i convert from charater to integer in c++ programming languge?
The other posters are correct that it's legal
to use a construction like:
int i = (int)c;
but the cast isn't necessary. The standard widening rules
of C and C++ automatically promote anything of type "char"
to type "int" within expression context. So it would
be equivalent to have said:
int i = c;
I suspect that the poster is really interested
in converting a character string representation of a
number into an integer. One poster suggested looking
up "itoa()", but I think they meant "atoi()":
char *p = "12345";
int i = atoi(p);
Another function worth looking at (which produces a "long"
rather than an "int") is:
strtol()
Reply:jainnys is right. You only have to cast it as an integer, because a single character is stored internally as an integer anyway. Just keep in mind that this gives you the ascii value...so don't go thinking that the character '3' will give you the number 3 when you convert it.
Reply:I don't remember the exact format but look up the "atoi()" function. That will do it.
Added: I looked it up... For arrays...
main()
{
char ary[5][]={"1","2","3","4","5"};
int v=0,k=0;
for(k=0; k%26lt;4; k++)
v+=atoi(ary[k]);
printf("%d",v"); // Will print '15'
}
Reply:Heres a sample for only ONE character
/* Convert.cpp */
/* Aim:- To change a character to an integer */
/* NOTE:- This program uses the old Borland C++ Compiler */
/* Some features may change */
/* By Senthil */
#include %26lt;iostream.h%26gt;
#include %26lt;conio.h%26gt;
void cnvrt_char(int);
void main()
{
char inp;
clrscr();
cout%26lt;%26lt;"Enter one character : ";
inp = getche();
cnvrt_char(inp);
getch();
}
void cnvrt_char(int inp)
{
cout%26lt;%26lt;"\nThe integer value for the character "%26lt;%26lt;(char)inp %26lt;%26lt;" is : "%26lt;%26lt;inp; //This is a continous line
//The variable inp was forced to show itself as a char
}
Instead of such a big program it could be solved like this:
Instaed of cnvrt_char(...) we can use cout%26lt;%26lt;(int)inp;
which meanas that we are forcing inp to show as an integer
It is called as Type Casting
Go ahead and try it for arrays
Reply:==================
char c;
c = 'c';
int a = (int) c;
==================
jainnys
Mind Experts Inc.
http://www.mindexp.com
How can i convert from charater to integer in c++ programming languge?
The other posters are correct that it's legal
to use a construction like:
int i = (int)c;
but the cast isn't necessary. The standard widening rules
of C and C++ automatically promote anything of type "char"
to type "int" within expression context. So it would
be equivalent to have said:
int i = c;
I suspect that the poster is really interested
in converting a character string representation of a
number into an integer. One poster suggested looking
up "itoa()", but I think they meant "atoi()":
char *p = "12345";
int i = atoi(p);
Another function worth looking at (which produces a "long"
rather than an "int") is:
strtol()
Reply:jainnys is right. You only have to cast it as an integer, because a single character is stored internally as an integer anyway. Just keep in mind that this gives you the ascii value...so don't go thinking that the character '3' will give you the number 3 when you convert it.
Reply:I don't remember the exact format but look up the "atoi()" function. That will do it.
Added: I looked it up... For arrays...
main()
{
char ary[5][]={"1","2","3","4","5"};
int v=0,k=0;
for(k=0; k%26lt;4; k++)
v+=atoi(ary[k]);
printf("%d",v"); // Will print '15'
}
Reply:Heres a sample for only ONE character
/* Convert.cpp */
/* Aim:- To change a character to an integer */
/* NOTE:- This program uses the old Borland C++ Compiler */
/* Some features may change */
/* By Senthil */
#include %26lt;iostream.h%26gt;
#include %26lt;conio.h%26gt;
void cnvrt_char(int);
void main()
{
char inp;
clrscr();
cout%26lt;%26lt;"Enter one character : ";
inp = getche();
cnvrt_char(inp);
getch();
}
void cnvrt_char(int inp)
{
cout%26lt;%26lt;"\nThe integer value for the character "%26lt;%26lt;(char)inp %26lt;%26lt;" is : "%26lt;%26lt;inp; //This is a continous line
//The variable inp was forced to show itself as a char
}
Instead of such a big program it could be solved like this:
Instaed of cnvrt_char(...) we can use cout%26lt;%26lt;(int)inp;
which meanas that we are forcing inp to show as an integer
It is called as Type Casting
Go ahead and try it for arrays
Reply:==================
char c;
c = 'c';
int a = (int) c;
==================
jainnys
Mind Experts Inc.
http://www.mindexp.com
Best C++ programming certification in finance?
I have already a master of Science in Mathematics and in science computer , but I didn't learn advanced C++ programming. I have only learnt Java. I wish to work in the financial industry and I would like to know 2 or 3 of the best professionnal certification in C++ programming, valuable for a carreer in financial sector.
Best C++ programming certification in finance?
Certification bootcamp- http://mcsdelearning.info/
ccna question and answers
http://ccnaqa.blogspot.com/
microsoft certification tutorials
at
http://mcse-mcsd.blogspot.com/
Reply:Computer Tutorials, Interview Question And Answer
http://freshbloger.com/
Certification bootcamp- http://mcsdelearning.info/
Best C++ programming certification in finance?
Certification bootcamp- http://mcsdelearning.info/
ccna question and answers
http://ccnaqa.blogspot.com/
microsoft certification tutorials
at
http://mcse-mcsd.blogspot.com/
Reply:Computer Tutorials, Interview Question And Answer
http://freshbloger.com/
Certification bootcamp- http://mcsdelearning.info/
How long does it take to learn a programming language like c++?
I work in the computer field doing helpdesk and I'm looking into changing fields.
How long does it take to learn a programming language like c++?
It is great that you are considering a more challenging career.Everyone has different aptitudes and motivation levels.
Generally speaking, if you eat, sleep, and drink C++ for the next two and a half years then, you ought to become a fairly proficient entry-level programmer.
Whichever programming language that you decide to focus on, I recommend that you work your way through several authoritative books. Study the concepts and examples. Duplicate the examples. In addition, try your own variations. Work out the problems. Write as many programs as possible.
Constantly challenge yourself by not only asking why—but also why not and what if. I would also suggest that you take a course in programming logic, systems analysis, and at least one other programming language.
Good luck.
________
Reply:to learn C++, not very long. to be get a really good understanding of it and to be taken seriously by employers (if you want to actually get a job programming) with take years plus a degree of some sort.
Reply:You can get an associates degree in C++ in about 2 years at a community college.
Reply:Im a computer science student and C++ was thought to us for 4 months. But this are only the basics. To master it, it would probably take you about a year and a half. It really depends on you though.
If you do not have any background in programming then it would seem difficult for you to learn.
It will also depend on what types of applications you plan to develop whit C++.
There are alot of references on the web to help you create your desired application.
Gudluk on your venture!
Reply:Learning the language is not a problem. u can learn C++ in less than a month. the part that takes time is developing application and going through the language to the advanced parts.
How long does it take to learn a programming language like c++?
It is great that you are considering a more challenging career.Everyone has different aptitudes and motivation levels.
Generally speaking, if you eat, sleep, and drink C++ for the next two and a half years then, you ought to become a fairly proficient entry-level programmer.
Whichever programming language that you decide to focus on, I recommend that you work your way through several authoritative books. Study the concepts and examples. Duplicate the examples. In addition, try your own variations. Work out the problems. Write as many programs as possible.
Constantly challenge yourself by not only asking why—but also why not and what if. I would also suggest that you take a course in programming logic, systems analysis, and at least one other programming language.
Good luck.
________
Reply:to learn C++, not very long. to be get a really good understanding of it and to be taken seriously by employers (if you want to actually get a job programming) with take years plus a degree of some sort.
Reply:You can get an associates degree in C++ in about 2 years at a community college.
Reply:Im a computer science student and C++ was thought to us for 4 months. But this are only the basics. To master it, it would probably take you about a year and a half. It really depends on you though.
If you do not have any background in programming then it would seem difficult for you to learn.
It will also depend on what types of applications you plan to develop whit C++.
There are alot of references on the web to help you create your desired application.
Gudluk on your venture!
Reply:Learning the language is not a problem. u can learn C++ in less than a month. the part that takes time is developing application and going through the language to the advanced parts.
"C" programming experience and expects plzzzzzzzzzzzz?
i did "C" programming i have very much confusion.
in the class our madam said "C" "program have logic",
every program have logic.
but i didn't understand what is "logic"
i tried dictionary but the answer is different could you please help me
becase i completed the "C" language course but i didnot meaning of logic according to programming language
thankyou
madhus
"C" programming experience and expects plzzzzzzzzzzzz?
Well Dear,
Dont worry!!! Logic is nothing but an Idea or a thought.
let me tell u more clearly, u know how to add two numbers
example: 5 + 5 = 10 --%26gt; x + y = z
So by adding 2 numbers u'll get Sum right [this is a logic for writing program on sum of two numbers] ... Similarly u need 2 inputs for writing a program... x and y [ above example] and an output sum [z] .
As u said u have completed ur course.... daily u need to practice on a system so that u will be in a stage to develop logics[ ideas] and even u may become Genius in this subject !
Hope u got it dear.... All the best!!!
Takecare :)
Reply:logic is just used for programming thats it .
whatever programming language we use to create program we need to know how the program work i.e what is its use
that is called as logic;
for example if u need to add two nos u need only two variables
but if u need to add n nos say 10
u must use array here and any loop statement
this is called logic
in simple words logic is nothing but just the idea about a program
Reply:hi madhu!
we programmers call logic as 'common sense'. but common sense is not so common.
ok i won't create more confusion.
just think of the answer to the following question.
if i ask 5 people to combine 2 digits to make 5 then
person 1 may think of 4 + 1 = 5
person 2 may think of 1 + 4 = 5
person 3 may think of 3 + 2 = 5
also there might be some people thinking of 6 - 1 = 5
and 5 + 0 = 5.
so it means that the above problem can be solved but in different ways by different people. also there can be many solutions to a problem but some of them are fast and easy while others may be lengthy and tedious.
thus it means that logic is something we use to solve a problem.
it terms of programming it means to arrive at the solution to a problem in the most easiest way which is also fast and efficient.
Reply:Logical operations include AND - OR- EXCLUSIVE OR and NOT operations. Real world examples:
1. If the car has gas AND the sun is shining we will go to the fair.
a. the car has no gas, the sun is not shining, No fair
b. the car has no gas, the sun is shining, No fair
c. the car has gas, the sun is not shining, No fair
d. the car has gas, the sun is shining, Go to fair
2. Logical
Gas= false Sun= false Fair = false
Gas= false Sun=true Fair= false
Gas= true Sun= false Fair= false
Gas= true Sun= true Fair= true
3. Binary
0 and 0 = 0
0 and 1 = 0
1 and 0 = 0
1 and 1 = 1
Reply:Hi,
Not only C but any other programming language has logic.
Each student in ur class is not learning C --%26gt; It means there r students those r learing other softwares also.
--%26gt;It also means other courses r also available in ur institute.
It means u have some facts and u r to draw meaning out of it.
It is logic. This is what that is used in programmes.
Logic means u are to give command to a computer in a way that it could give u desired results.
e.g;
The following statements will first clean the screen the print "Logic".
clrscr();
printf("Logic");
The following statements will first print "Logic" then clean the screen
printf("Logic");
clrscr();
So u cant see any output on the screen. So logically first u have to clear the screen then print something.
If a door is already closed. can u close it again.. Logically if door is closed, u can open it only.
or if a door is closed u cant go out unless u open it. Similary if a file is open u cant open it again.
If a file is closed u cant read/write anything in it unless u open it first. This is logic.
Reply:hi, dont be afraid of the term 'logic', it is a just english word.
Actually by logic your mam means that --"there is a concept behind every program".
I think firstly i make u clear that what a program is?
Everything what a human can do manually, can be converted into program.
There is a basic concept behind everything.
Just imagine how u make calculations.while doing multiplication, u have in ur mind the concept of doing multiplication. that is called logic..
Have u ever made a program of pyramid like
*
**
***
****
in this program there is the logic that u have to use two loops.
i think i made it very clear to u that what is logic.
For more help i am always be there on yahoo answers.
Reply:Logic is what I call common sense the ability to understand how things work and or how to follow what someone is saying or to Read between the lines.
http://www.devarticles.com/
white flowers
in the class our madam said "C" "program have logic",
every program have logic.
but i didn't understand what is "logic"
i tried dictionary but the answer is different could you please help me
becase i completed the "C" language course but i didnot meaning of logic according to programming language
thankyou
madhus
"C" programming experience and expects plzzzzzzzzzzzz?
Well Dear,
Dont worry!!! Logic is nothing but an Idea or a thought.
let me tell u more clearly, u know how to add two numbers
example: 5 + 5 = 10 --%26gt; x + y = z
So by adding 2 numbers u'll get Sum right [this is a logic for writing program on sum of two numbers] ... Similarly u need 2 inputs for writing a program... x and y [ above example] and an output sum [z] .
As u said u have completed ur course.... daily u need to practice on a system so that u will be in a stage to develop logics[ ideas] and even u may become Genius in this subject !
Hope u got it dear.... All the best!!!
Takecare :)
Reply:logic is just used for programming thats it .
whatever programming language we use to create program we need to know how the program work i.e what is its use
that is called as logic;
for example if u need to add two nos u need only two variables
but if u need to add n nos say 10
u must use array here and any loop statement
this is called logic
in simple words logic is nothing but just the idea about a program
Reply:hi madhu!
we programmers call logic as 'common sense'. but common sense is not so common.
ok i won't create more confusion.
just think of the answer to the following question.
if i ask 5 people to combine 2 digits to make 5 then
person 1 may think of 4 + 1 = 5
person 2 may think of 1 + 4 = 5
person 3 may think of 3 + 2 = 5
also there might be some people thinking of 6 - 1 = 5
and 5 + 0 = 5.
so it means that the above problem can be solved but in different ways by different people. also there can be many solutions to a problem but some of them are fast and easy while others may be lengthy and tedious.
thus it means that logic is something we use to solve a problem.
it terms of programming it means to arrive at the solution to a problem in the most easiest way which is also fast and efficient.
Reply:Logical operations include AND - OR- EXCLUSIVE OR and NOT operations. Real world examples:
1. If the car has gas AND the sun is shining we will go to the fair.
a. the car has no gas, the sun is not shining, No fair
b. the car has no gas, the sun is shining, No fair
c. the car has gas, the sun is not shining, No fair
d. the car has gas, the sun is shining, Go to fair
2. Logical
Gas= false Sun= false Fair = false
Gas= false Sun=true Fair= false
Gas= true Sun= false Fair= false
Gas= true Sun= true Fair= true
3. Binary
0 and 0 = 0
0 and 1 = 0
1 and 0 = 0
1 and 1 = 1
Reply:Hi,
Not only C but any other programming language has logic.
Each student in ur class is not learning C --%26gt; It means there r students those r learing other softwares also.
--%26gt;It also means other courses r also available in ur institute.
It means u have some facts and u r to draw meaning out of it.
It is logic. This is what that is used in programmes.
Logic means u are to give command to a computer in a way that it could give u desired results.
e.g;
The following statements will first clean the screen the print "Logic".
clrscr();
printf("Logic");
The following statements will first print "Logic" then clean the screen
printf("Logic");
clrscr();
So u cant see any output on the screen. So logically first u have to clear the screen then print something.
If a door is already closed. can u close it again.. Logically if door is closed, u can open it only.
or if a door is closed u cant go out unless u open it. Similary if a file is open u cant open it again.
If a file is closed u cant read/write anything in it unless u open it first. This is logic.
Reply:hi, dont be afraid of the term 'logic', it is a just english word.
Actually by logic your mam means that --"there is a concept behind every program".
I think firstly i make u clear that what a program is?
Everything what a human can do manually, can be converted into program.
There is a basic concept behind everything.
Just imagine how u make calculations.while doing multiplication, u have in ur mind the concept of doing multiplication. that is called logic..
Have u ever made a program of pyramid like
*
**
***
****
in this program there is the logic that u have to use two loops.
i think i made it very clear to u that what is logic.
For more help i am always be there on yahoo answers.
Reply:Logic is what I call common sense the ability to understand how things work and or how to follow what someone is saying or to Read between the lines.
http://www.devarticles.com/
white flowers
Question in C programming 2 answer quickly please?
Write a program that reads in a positive integer N and calculates and displays the sum of the first N even integers. For example if N is 6, the program should display the value 42, which is: 2+4+6+8+10+12=42.
Caution: The program has to do the addition.
Question in C programming 2 answer quickly please?
int n;
int sum = 0;
scanf("%d",%26amp;n);
for ( int i = 1; i %26lt;= n; ++i){
sum += i*2;
}
printf(sum);
Caution: The program has to do the addition.
Question in C programming 2 answer quickly please?
int n;
int sum = 0;
scanf("%d",%26amp;n);
for ( int i = 1; i %26lt;= n; ++i){
sum += i*2;
}
printf(sum);
Which is a good site to learn C++ programming for a 12 year old?
Yes i am 12 years old and i want to learn programming but do not understnad most of the tutorials
Which is a good site to learn C++ programming for a 12 year old?
Go to the bookstore and get a "C++ Programming for Dummies" book. It sounds bad, but they really couldn't make it any simpler than that.
You may just want to familiarize yourself with basic programming concepts first: variables, operators, conditionals, loops, structures, objects/classes, etc.
Reply:here are some syt's which offer C++ made easy.
good luck !!
u could also get some cd's which offer C++ tutorials
they are made very easy to understand
eg:name of cd : Inndisoft Interactive Training C++ made easy
below r syt's which offer free courses online
Which is a good site to learn C++ programming for a 12 year old?
Go to the bookstore and get a "C++ Programming for Dummies" book. It sounds bad, but they really couldn't make it any simpler than that.
You may just want to familiarize yourself with basic programming concepts first: variables, operators, conditionals, loops, structures, objects/classes, etc.
Reply:here are some syt's which offer C++ made easy.
good luck !!
u could also get some cd's which offer C++ tutorials
they are made very easy to understand
eg:name of cd : Inndisoft Interactive Training C++ made easy
below r syt's which offer free courses online
Subscribe to:
Posts (Atom)