Friday, October 4, 2019

C++ Language कैसे सीखें? - fact-informations

दोस्तों क्या आप भी सीखना चाहते हो शुरू से c++ और आपको c++ का ABC भी नहीं पता है तो कोई बात नहीं आप मेरे पोस्ट  को पूरा पढ़ो फिर मैं ये गारंटी देता हु की आप 100% c++ का बेसिक सिख जाओगे तो दोस्तों आपको सबसे पहले जानना होगा की  c++ क्या होता है फिर मैं आपलोगो को प्रोगरामिंग भी बनाना सिखाऊंगा

                                   

C ++ Language  कैसे सीखे?

C++ Language कैसे सीखें? - fact-informations,c++ kaise sikhe in hindi
c++ mein program kaise banaye 

C ++ Language  कैसे सीखे?


What is c++ ?

Answer:-c++ is a programing language was develop at  At and टी bell in the early  1980s by Bjarne strostrup.

समझे:- c++ एक कंप्यूटर प्रोग्रामिंग भासा है जिसे AT and टी bell में बनाया गया था जिसकी स्थापना 1980 के लगभग हुआ था इसे Bjarne strostrup के द्वारा बनाया गया था

*c++ provides following types of tokens(smallest individual unit in a program ) keyword,identifiers,literals, punctuation,operations.

 समझे:-दोस्तों c++ में जो भी प्रोग्राम बनाये जाते है वो इन 5 tokens से बनाये जाते है जो मैंने ऊपर लिखा

*c++ provide two types of data types

(i)Fundamental data types
(ii)Derived data types

समझे:-दोस्तों c++ में दो तरह के data types होते है
                 (i)Fundamental data types का मतलब होता है दोस्तों प्रोग्राम में जितने भी basics चीज़ो का यूज़ होता है उसे ही Fundamental data types कहते है
(ii)derived data types का मतलब दोस्तों विस्तार में बनाना मतलब किसी भी छोटे चीज़ो को बड़ा यानी विस्तार में बनाना derived data types कहलाते है

अब दोस्तों देखते है Fundamental data types कौन-कौन  से होते है:-



*In c++ there are five Fundamental data types
Char,int,float,double and void


Derived data types कौन-कौन से होते हैं:-



*In c++ derive data types are array,function,pointers,references,constants,classes,structures,union and enumeration


*Precedence of operator 



++ (post increment)
- -(post decrements)
- (unary minus)
* (multiply)
/ (divide)
% (modulus)
+ (add)
- (subtract)
< (less than)
>(greater than)
< = (less than equal)
> = (greater than equal)
= = (equal)
= (assignment operator)
&& (logical AND)
|| (logical OR)
? : (conditional expression)
, (comma operator)




दोस्तों c++  में प्रोग्रामिंग कैसे करते है आज मैं इस पोस्ट में बताऊंगा इसलिए दोस्तों पोस्ट पूरा  पढ़ा तो आप अच्छे से समझ पाओगे:-
दोस्तों सबसे पहले आप अपने pc में turbo c/c++ सॉफ्टवेयर डाउनलोड कर ले ये सॉफ्टवेयर काफी पॉपुलर है उसके बाद आप सभी प्रोग्राम को उसमे ही बनाये ताकि आपकी प्रैक्टिस अच्छी हो 



programming no.1 )Write a program to print sum of the two 
                                  number?
Answer:-#include<iostrem.h>
               #include<conio.h>
               void main()
               {
                clrscr();
                 int a,b,s;
                 cout<<"enter the first no.:";
                  cin>>a;
                  cout<<"enter the 2nd no.:";
                  cin>>b;
                  s=a+b;
                  cout<<"sum of the two no. is:"<<s;
                   getche();
                    }

दोस्तों यहां मैं आपसे कहना चाहता हु की अगर आपने पहले c programming language नहीं सीखे तो पहले  सिख ले क्युकी अगर आपने c लैंग्वेज नहीं सीखे हो तो थोड़ी दिक्कत हो सकती है c++ सिखने में वैसे मैं इस प्रोग्राम को भी अच्छे से समझाऊंगा c लैंग्वेज सिखने के लिए निचे link पर क्लिक कीजिये

समझिए :-दोस्तों कोई भी प्रोग्रामिंग में सबसे पहले header file लिखा जाता है चाहे वो c हो या c++ फिर एक void main का फंक्शन लिखना होता है ताकि हमारा प्रोग्राम रन करे ये फंक्शन बहुत ही इम्पोर्टेन्ट होता है प्रोग्राम में फिर एक open curly braces दिया जाता है यहां से coding या प्रोगाम लिखना शुरू होता है फिर एक clrscr फंक्शन देना होता ताकि पहले जो प्रोग्रम बनाया मैंने pc में उसका आउटपुट डिलीट हो जाए और इस प्रग्राम का नई आउटपुट दिखाए फिर एक int टाइप का डाटा टाइप लिया मैंने क्युकी मुझे no. प्रिंट करना है अब दोस्तों जानते  है cout और cin का क्या यूज़  है प्रोगरामिंग में दोस्तों cout का यूज़ प्रोगरामिंग में इसलिए करते है क्युकी आउटपुट में पहले no. एंटर करना होता है जैसे 6 उसके बाद no. को assign करना पड़ता है जैसे  a=6 assign करने के लिए दोसो cin का यूज़ किया जाता है जो same मैंने प्रोगरामिंग में किया हु फिर टोटल करना होता मतलब question मं जो बोलै गया करने sum bola तो sum करेंगे डिफरेंस बोलेगा तो डिफरेंस करेंगे उसके बाद टोटल को प्रिंट करने के लिए output स्क्रीन में फिर cout का यूज़ किया जाता है फिर एक getche  keyword लगाया जाता है आउटपुट स्क्रीन को होल्ड रखने के लिए उसके बाद एक close curly braces देना पड़ता है जब प्रोग्राम पूरा समाप्त हो जाता है तो दोस्तों अगर आपने अभी भी ये प्रोग्राम नहीं समझा तो आप लिंक पर क्लिक करके पहले  c language सिख ले उसके बाद इसे सीखोगे तो आप इसे अच्छी तरह समझ जाओगे


programming no. 2)Write a program to print difference of the 

                                   two number?
Answer:- #include<iostrem.h>
                #include<conio.h>
                void main()
                {
                 clrscr();
                int a,b,d;
                cout<<"enter the first no.:";
                cin>>a;
                cout<<"enter the second no.:";
                 cin>>b;
                 d=a-b;
                 cout<<"difference of the two no.is:"<<d;
                 getche();
                 }

दोस्तों इन् दोनों प्रोग्राम को आप ऐसे भी बना सकते हो जैसे मैंने निचे बनाया 



#include<iostrem.h>

#include<conio.h>
void main()
{
clrscr();
int a,b,d;
cout<<"enter the two no.:";
cin>>a>>b;
d=a-b;
cout<<"difference of the two no. is:"<<d;
getche();
}

दोस्तों आप इसी तरह multiplication का और division का भी प्रोग्राम बना सकता हो 
अगर दोस्तों प्रोग्राम में आप एक भी colon(:)या semi colon(;) छोड़ा तो आपका प्रोग्राम रन नहीं करेगा दोस्तों जब आप एक प्रोग्रेम बना लोगे तो उसे रन  कराना होगा अपने कीबोर्ड पर ctrl+f9 प्रेस करके अगर आपका प्रोग्राम सक्सेस हो गया तो आपका प्रोग्राम रन हो जायेगा 




programming no.3)Write a program to find out third angle of a triangle if two angle are entered by the user?


Answer:-#include<iostream.h>

               #include<conio.h>
               void main()
                {
                 clrscr();
                 int a,b,c;
                 cout<<"enter the two angle of the triangle:";
                  cin>>a>>b;
                  c=180-(a+b);
                  cout<<"third angle of the triangle is"<<c;
                  getche();
                   }

c=180-(a+b) ye third angle ka formula hai.


programming no.4)Write a program to find out second angle of a triangle if two angle are entered by the user?

Answer:-#include<iostream.h>

               #include<conio.h>
               void main()
               {
                clrscr();
                int a,b,c;
                cout<<"enter the two angle of the triangle:";
                 cin>>a>>c;
                 b=180-(a+c);
                 cout<<"second angle of the triangle is:"<<b;
                  getche();
                  }


b=180-(a+c) ye second angle ka formula hai.
दोस्तों इसी तरह आप 1st angle भी निकाल सकते हो 


a=180-(b+c) ye first angle ka formula hai.


programming no.5)Write a program to create class that will accept roll no,name and class?


Answer:-

 #include<<"iostream.h>
#include<conio.h>
void main()
{
clrscr();
char name[30],cl[20];
int rollno;
cout<<"enter the name:";
cin>>name;
cout<<"enter the class:";
cin>>cl;
cout<<"enter the rollno:";
cin>>rollno;
cout<<"the name is:"<<name;
cout<<"the class is:"<<cl;
cout<<"the rollno is:"<<rollno;
getche();
}

दोस्तों अगर ये प्रोग्राम आपको समझ नहीं आया तो मैं  ऊपर एक लिंक दिया c language का तो उससे आप पहले बेसिक्स नॉलेज ले ले सभी डाटा टाइप को अच्छी से समझ लीजिये उसमे मैंने बहुत अच्छी तरह से समझाया है उसके बाद ये आप पक्का अच्छी तरह समझ जाओगे दोस्तों अगर आप  char data type लोगे तो उसमे आपको एक साइज देना होगा कुछ भी [30],[20] या कुछ भी। 



programming no.6)Write a program to create a biodata ?
Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char name[27],fname[27],mname[27],city[25],qual[20];
int age,pincode;
cout<<"enter the name:";
cin>>name;
cout<<"enter the father name:";
cin>>fname;
cout<<"enter the mother name:";
cin>>mname;
cout<<"enter the city:";
cin>>city;
cout<<"enter the qualification:";
cin>>qual;
cout<<"enter the age:";
cin>>age;
cout<<"enter the pincode:";
cin>>pincode;
cout<<"\n the name is:"<<name:"<<name;
cout<<"\n the father name is:"<<fname;
cout<<"\n the mother name is:"<<mname;
cout<<"\n the city is:"<<city;
cout<<\n the qualification is:"<<qual;
cout<<"\n the age is:"<<age;
cout<<"\n the pincode is:"<<pincode;
getche();
}

दोस्तों यहां \n का यूज़  इसलिए किया गया ताकि आउटपुट line by line निकले प्रोग्राम में 
दोस्तों आप सभी प्रोग्राम को कॉपी में note कर ले और उसे pc में बनाये turbo c/c++ सॉफ्टवेयर में और उसे रन कराये 




programming no.7)Write a program to find out the addition,subtraction,multiplication &division;

Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,s,d,m,div;
cout<<"enter the no.:";
cin>>a>>b;
s=a+b;
d=a-b;
m=a*b;
div=a/b;
cout<<"the sum is:"<<s;
cout<<"the difference is:"<<d;
cout<<"the multiplication is:"<<m;
cout<<"the division is:"<<div;
getche();
}



programming no.8)Write a program to find out area of circle and area of square?

Answer:-
#include<iostram.h>
#include<conio.h>
void main()
{
clrscr();
int r,s,ars;
float arc;
cout<<"enter the radius:";
cin>>r;
cout<<"enter the side:";
cin>>s;
arc=3.14*r*r;
ars=s*s;
cout<<"area of circle is:"<<arc;
cout<<area of side is:"<<ars;
getche();
}


Programming no.9)Write a program find out area and perimeter of rectangle?

Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int l,b,ar,pr;
cout<<"enter the length and breadth:";
cin>>l>>b;
ar=l*b;
pr=2*(l+b);
cout<<"area of rectangle is:"<<ar;
cout<<"perimeter of rectangl is:"<<pr;
getche();
}



programming no.10)Write a program to check the person is eligible to vote or not?

Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int age;
cout<<"enter the age:";
cin>>age;
if(age>=18)
cout<<"the person is eligible to vote:";
else
cout<<"\n the person is not eligible to vote:";
getche();
}


programming no.11)Write a program to check a person is poor or rich his salary is 20,000?

Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int salary;
cout<<"enter the salary:";
cin>>salary;
if(salary>=20,000)
cout<<"\n person is rich:";
else
cout<<"\n person is poor:";
getche();
}


programming no.12)Write a program to find out the simple interest?

Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr()
int p,r,t,si;
cout<<"enter the principle:";
cin>>p;
cout<<"enter the rate:";
cin>>r;
cout<<"enter the time:";
cin>>t;
si=(p*r*t)/100;
cout<<""\n principle is:"<<p;
cout<<"rate is:"<<r;
cout<<"time is:"<<t;
getche();
}



programming no.13)Write a program find out the even or odd?

Answer:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
cout<<"enter the no.:";
cin>>a;
if(a%2==0)
cout<<"even no.is:";
else
cout<<"odd no.is:";
getche();
}


 दोस्तों अगर आप कॉलेज के स्टूडेंट हो और आपको c++ सिखने में मुश्किल हो रही तो आप मेरे इस आर्टिकल से हिंदी में c++ सिख सकते हो पूरी विस्तार में। 




Disqus Comments