हिंदी माध्यम नोट्स
Class 6
Hindi social science science maths English
Class 7
Hindi social science science maths English
Class 8
Hindi social science science maths English
Class 9
Hindi social science science Maths English
Class 10
Hindi Social science science Maths English
Class 11
Hindi sociology physics physical education maths english economics geography History
chemistry business studies biology accountancy political science
Class 12
Hindi physics physical education maths english economics
chemistry business studies biology accountancy Political science History sociology
English medium Notes
Class 6
Hindi social science science maths English
Class 7
Hindi social science science maths English
Class 8
Hindi social science science maths English
Class 9
Hindi social science science Maths English
Class 10
Hindi Social science science Maths English
Class 11
Hindi physics physical education maths entrepreneurship english economics
chemistry business studies biology accountancy
Class 12
Hindi physics physical education maths entrepreneurship english economics
chemistry business studies biology accountancy
Common Programming Errors in hindi in c language , सामान्य एरर c कंप्यूटर भाषा में हिंदी में
- Missing Semicolon
C language मे सभी statement semicolon से terminate होती है |अगर कोई semicolon नहीं होता है तब complier confuse हो जाता है और error message आ जाता है |
उदहारण के लिए :
a=a+b
c=c-d;
इस उदहारण मे complier second line को भी first line का part मान लेता है |इसलिए c भी एक variable की तरह treat होता है और कोम्प्लिएर undefined name की error दे देता है |
इस उदाहरण मे , message और location की location गलत है इसलिए error message second line के लिए होता है |
2.Misuse of Semicolon
दूसरी बड़ी मिस्टेक होती है semicolon का misuse|उदाहरण के लिए :
while(i<12);
{
printf(“Good Morning”);
i++;
}
इस case मे ,कोई error message produce नहीं होता है क्योकि ये syntactically सही है |लेकिन इस तरह के error ,syntax error से भी worst होती है |लेकिन अगर प्रोग्रामर यही mistake for loop के साथ करता है |कोम्प्लिर एक बार ही execute होगा |क्योकि इसमें increment एक ही बार होगा |जैसे
for(i=0;i<12;i++);
{
printf(“Good Morning “);
}
इस प्रकार की error ,syntax error से भी worst आउटपुट देती है |जैसे assignment operator(=) और Equal (==) मे confusion|जैसे
if(i=1)
{
i++;
}
इस उदहारण मे, i की value 1 से initial होगी |बाद मे increament होगा |लेकिन इस statement से कोई relation operation perform नहीं होगा|
2.Missing Braces
ये बहुत common error होती है | प्रोग्रामर कई बार brace को close करना भूल जाता है लेकिन complier हमेशा ओपनिंग brace का number जरुर रखता है | और अगर प्रोग्रम्मर किसी क्लोज brace को भूल जाता है तब complier इसे नोटिस करता है और unexpected आउटपुट देता है |
बरसे से दूसरी बड़ी error होती की जब दो या दो से अधिक statement block को लिखा जाता है तब उन blocks को बbraces मे closeकिया जाता है |
जैसे
printf(“data”);
scanf(“%d %d”,&a , &b);
if(a<b)
printf(“a is smaller than b “);
printf(“a is less than b”);
printf(“Have a nice day”);
इस उदाहरण मे अगर condition a<b सही होगी तब a is smaller than b print होगा |लेकिन इस code से a is smaller than b , a is less than b और Have a nice day एक साथ print होगा |
इसका सही code है :-
printf(“data”);
scanf(“%d %d”,&a , &b);
if(a<b)
{
printf(“a is smaller than b “);
}
printf(“a is less than b”);
printf(“Have a nice day”);
4.Missing Quotes
जब हम quotes को भूल जाते tab बड़ी प्रॉब्लम create हो सकती है |string को charecter variable से अलग करने quotes का use किया जाता है| अगर quotes नहीं use किये जाते तब string एक chrecter variable की तरह कार्य करता है |
जैसे
if(reply== no)
{
city= A; // A is constant variable here
}
else
{
city=’B’; // B is string here
}
5.Improper Comment Character
C language मे ,सभी comment /* और */ से close होती है |in syntax के बीच लिखे statement को compiler compile नहीं करता है |अगर प्रोग्रामर */ भूल जाता है तब comment भी comand की treat होता है |इसलिए इसका error आ सकता है |
उदाहरण के लिए
a=b; /* value of b assign into a */
if(a==c) /* condition check*/
c language मे nested comment allow नहीं है |उदाहरण के लिए
/* assignment begin
TEMP=A;
A=B;
B=TEMP;
/* PRINTING START*/
printf(“Value of a or b are %d or %d”,A B); */
इस उदाहरण मे , PRINTING START comment की तरह treat नहीं होगा क्योकि अभी ओपनिंग comment /* का क्लोज होना जरुरी है |
यहा पर /* assignment begin
TEMP=A;
A=B;
B=TEMP;
/*
एक comment है |
और
*/ printf(“Value of a or b are %d or %d”,A B); */ दूसरा comment है |
इसका सही from है :-
/* assignment begin*/
/*TEMP=A;*/
/*A=B;*/
/*B=TEMP;*/
/* PRINTING START*/
/*printf(“Value of a or b are %d or %d”,A B); */
6.Undeclare variable
किसी भी variable को c प्रोग्रम मे use करने से पहले declare करना जरुरी है |
7.Misusing quotes
किसी प्रोग्रामर को ये ध्यान रखना चाहिए की single quotes केवल charecter को handle करने के लिए किया जाता है |किसी string को handel करने के लिए double quotes को use करते है |
उदाहरण के लिए
char a[16];
char b[1];
a=”Parth”;
b=’w’;
Identify Error
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,c;
float m,d;
printf(“Data”);
scanf(“%d %d”,&a &b);
c=a+b
e=a-b;
d=a/b;
m=a*b
printf(output of a+b is %d, c);
printf(“output of a-b is %d”, e)
printf(output of a*b is %d, m);
printf(‘output of a\b is %f”, c);
getch();
}
इस article मे syntax error को पढ़ा |अब अगले article मे operation और function related error को पढेगे |
Recent Posts
द्वितीय कोटि के अवकल समीकरण तथा विशिष्ट फलन क्या हैं differential equations of second order and special functions in hindi
अध्याय - द्वितीय कोटि के अवकल समीकरण तथा विशिष्ट फलन (Differential Equations of Second Order…
नियत वेग से गतिशील बिन्दुवत आवेश का विद्युत क्षेत्र ELECTRIC FIELD OF A POINT CHARGE MOVING WITH CONSTANT VELOCITY in hindi
ELECTRIC FIELD OF A POINT CHARGE MOVING WITH CONSTANT VELOCITY in hindi नियत वेग से…
four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं
चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…
Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा
आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…
pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए
युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…
THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा
देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…