Computer Science
RSMSSB BCI — प्रोग्रामिंग मास्टर रिवीजन हैंडबुक
🖥️ RSMSSB BCI — प्रोग्रामिंग भाषा मास्टर रिवीजन हैंडबुक
C · C++ · Java · Programming Languages · OOP | Rajasthan Gyan Quiz 1-6 + Sanfoundry + Handwritten Notes समेकित | July 2026
🚨 मेरी गलतियाँ और भ्रम (Exam Traps) — सर्वोच्च प्राथमिकता
| गलत अवधारणा | सही अवधारणा | क्यों गलती हुई | 🧠 मेमोरी ट्रिक |
|---|---|---|---|
| Compiler = Line by Line | Compiler = पूरा Program एक साथ; Interpreter = Line by Line | दोनों को उल्टा याद रखना | Compiler=Complete, Interpreter=Individual line |
| FORTRAN = "Format/Forbid Translation" | FORTRAN = FORmula TRANslation (John Backus, Scientific) | मिलते-जुलते नाम वाले Options | FOR=Formula |
| Logical Operators = >,<,= | ये Relational Operators हैं। Logical = &&, ||, ! | Quiz-6 Answer Key में गलती (🚨 नीचे देखें) | &&,||,! = Logical | >,<,== = Relational |
| C में User Defined Function के लिए कोई keyword (define/def) चाहिए | C में User Defined Function के लिए कोई विशेष keyword नहीं होता (🚨 Faulty Q) | #define के साथ Confusion | #define = Macro, Function ≠ Macro |
| Assembly Language को सीधे CPU समझता है | केवल Machine Language (Binary) को CPU सीधे समझता है | Low Level की दोनों Sub-types में Confusion | Machine=No Translator, Assembly=Assembler चाहिए |
| Constructor का Return Type होता है (void) | Constructor का कोई Return Type नहीं होता (void भी नहीं) | Function जैसा दिखने से भ्रम | Constructor Name = Class Name, No Return |
| Abstraction = Data+Method Binding | वह Encapsulation है। Abstraction = केवल आवश्यक जानकारी दिखाना | दोनों OOP Pillars आपस में जुड़े | Encapsulation=Bind करना, Abstraction=Hide करना |
| C++ Class Members Default = Public | C++ में Class Default = Private; Struct Default = Public | C का struct याद रहने से Confusion | Class→Private, Struct→Public |
| Python Command शुरू करने के लिए "py" | परीक्षा में Standard उत्तर "python" (py भी valid है पर Exam-answer python) | Modern systems में दोनों चलते हैं | Exam को "python" चाहिए |
| malloc() और calloc() एक जैसे होते हैं | malloc=1 argument, Garbage value | calloc=2 arguments (n,size), Zero-initialized | दोनों Dynamic Memory Functions | C for Contiguous+Clear(0) |
| (int) typecast से Floor होता है | (int) typecast Truncate toward zero करता है — Floor नहीं | (int)(-7.5) को गलती से -8 समझना | (int)(-7.5) = -7, NOT -8 |
| Static Variable का Default Value Garbage होता है | Static Variable का Default = 0 (Zero); auto/register = Garbage | auto के साथ Confusion | Static=0, Auto/Register=Garbage |
| i++ का Result "i=i+i" | i++ = i = i+1 | Quiz-1/2 में बार-बार पूछा — गलत Option चुनना | ++ = +1 ही |
| Assembler, High Level को Machine Language में बदलता है | Assembler केवल Assembly → Machine Language बदलता है। HLL के लिए Compiler/Interpreter | तीनों Translators में Confusion | Assembler=Assembly only |
| Vector पुराना है इसलिए गलत उत्तर | परीक्षा (पुराना पैटर्न) में Java Dynamic Array का Exam-Answer अब भी "Vector" | Modern ArrayList से Confusion | Exam Perspective≠Industry Perspective |
| 0 से शुरू संख्या (जैसे 016) Java में Decimal मानी जाती है | 0 से शुरू Number Java में Octal माना जाता है → 016(Octal)=14(Decimal) | C/C++ जैसा व्यवहार न होने से भ्रम | 0-prefix = Octal in Java too |
| String Array के खाली Elements में "" (empty string) होता है | Reference Type Array के Default Elements = null (Primitive के लिए 0/false) | Primitive vs Reference Type भ्रम | Object Array Default=null |
🎯 उच्च प्राथमिकता कमजोर क्षेत्र (Quiz 1-6 Performance Trend: 19,19,20,14,13,18/28-30)
| टॉपिक | स्तर | दोहराव (आवृत्ति) |
|---|---|---|
| OOP (Encapsulation, Inheritance, Polymorphism, Constructor, Abstract Class) | 🔴 अति कमजोर | 15+ बार |
| Java (JVM, Bytecode, Scanner, File Handling, Array Default) | 🔴 अति कमजोर | 12+ बार |
| Compiler / Interpreter / Assembler | 🟠 कमजोर | 12+ बार |
| C Programming (Pointers, Type Conversion, Storage Class, Operators) | 🟠 कमजोर | 10+ बार |
| Programming Language Classification / Developers (1GL-5GL) | 🟡 मध्यम | 8+ बार |
| HTML/XML Basics | 🟡 मध्यम | 8+ बार |
| C++ Syntax (Constructors, this, virtual, inline, namespace) | 🟡 मध्यम | नया — हाल की हैंडलिखित नोट्स से |
| Arrays & C Tokens | 🟢 ठीक | 6+ बार |
⭐⭐⭐ प्रोग्रामिंग भाषाएँ — इतिहास व डेवलपर्स (हाई-यील्ड टेबल)
| भाषा | Full Form / नोट | Developer | उद्देश्य |
|---|---|---|---|
| C | General purpose, Procedural, Middle-Level | Dennis M. Ritchie (1972, AT&T Bell Labs) | System Programming |
| C++ | C का Successor, OOP | Bjarne Stroustrup | OOP |
| Java | Platform Independent, OOP | James Gosling | Web/App/Android |
| Python | High-level, Interpreted | Guido van Rossum | Versatile/AI |
| FORTRAN | FORmula TRANslation — पहली High Level Language (1957) | John Backus | Scientific/Mathematical |
| COBOL | Common Business Oriented Language | Grace Hopper (bug/debug शब्द भी इन्हीं से) | Business/Commercial |
| BASIC | Beginner's All-purpose Symbolic Instruction Code (1964) | John G. Kemeny & Thomas Kurtz | Education |
| Pascal | पहली भाषा जिसने OOP Concept Introduce किया | Niklaus Wirth | Teaching |
| Simula-67 | पहली सच्ची (True) OOP भाषा | — | OOP |
| LISP | List Processing — पहली Self-Hosting Language | — | AI |
| Smalltalk | पहली Pure OOP Language | — | — |
| PROLOG | Logic Programming, 5GL, गैर-प्रक्रियात्मक (Non-Procedural) | — | AI |
| HTML | Hyper Text Markup Language | Tim Berners-Lee | Web Page |
| XML | eXtensible Markup Language — Hierarchical Data, Root Element से शुरू | — | Data Storage/Exchange |
| SQL | Structured Query Language — 4GL उदाहरण | — | Database |
| VB / C# | Visual Basic / C Sharp | Microsoft | Windows Apps |
🧠 ट्रिक: COBOL→Grace(Business) | FORTRAN→Backus(Formula) | BASIC→Kemeny(Beginner) | Pascal→1st OOP concept | Simula-67→असली 1st OOP
Programming Language Types (Generation-wise)
| Generation | उदाहरण |
|---|---|
| 1GL | Machine Language (Binary) |
| 2GL | Assembly Language |
| 3GL | C, Java, COBOL, FORTRAN (High Level) |
| 4GL | SQL, Query Languages |
| 5GL | PROLOG (Logic Programming, AI) |
⭐⭐⭐ Low Level vs High Level Language
| Feature | Low Level | High Level |
|---|---|---|
| Machine Dependency | Machine Dependent | Machine Independent |
| Interactive | Machine Interactive | User Interactive |
| Speed | तेज़ | धीमा |
| Memory | कम | ज़्यादा |
| Translator | Machine=कोई नहीं, Assembly=Assembler | Compiler/Interpreter |
| उदाहरण | Binary(0101), Assembly(ADD,MOV) | C, C++, Java, Python |
⚠ EXAM TRAP C/C++ में
int का size Machine-Dependent (2B/4B) होता है, लेकिन Java/Python में int हमेशा 4 Bytes Fixed (Machine Independent)।⭐⭐⭐ Compiler vs Interpreter vs Assembler
| Feature | Compiler | Interpreter | Assembler |
|---|---|---|---|
| अनुवाद | पूरा Program एक साथ (Whole) | Line-by-Line | Assembly → Machine |
| Output File | .obj/.exe बनाता है | कोई अलग File नहीं | Object Code |
| Speed | Faster Execution | Slower | — |
| Error | पूरा Compile होने के बाद सभी Errors | पहली Error पर रुकता है | — |
| उदाहरण | C, C++ | Java, Python (JIT भी use करता है) | Assembly Language Translator |
⭐ PYQ Compiler Design Phases: Lexical Analysis → Syntax Analysis (Parsing) → Semantic Analysis → Code Generation। Syntax Analysis को Parsing कहते हैं। गलत Syntax → Compile Time Error।
🔤 C भाषा — पूर्ण विवरण
इतिहास व Key Facts
| Inventor | Dennis M. Ritchie | Year | 1972 |
| Place | AT&T Bell Labs | Old Name | NB (New B) |
| Predecessor | B Language | Successor | C++ |
| Level | Middle Level Language (HLL Features + Low Level Features दोनों) | ||
| Type | Procedural / Structured / Self-Hosting Language (Compiler खुद C में लिखा गया) | ||
Program Execution हमेशा
main() function से शुरू होती है। LISP = पहली Self-Hosting Language (ऐतिहासिक रूप से), C भी Self-Hosting है।C Program के 4 Phases (EPCL)
| Phase | Input → Output | क्या होता है |
|---|---|---|
| 1. Editing | → .c file | Source Code लिखना |
| 2. Pre-processing | .c → .i file | #include, #define हैंडल होते हैं |
| 3. Compiling | .i → .obj file | Machine Code में Translation |
| 4. Linking | .obj+Libraries → .exe | Final Executable बनता है |
Tokens & Identifier Rules
- Token = C का सबसे छोटा meaningful unit: Keyword, Identifier, Literal/Constant, Operator, Special Symbol, White Space
- C में ठीक 32 Keywords होते हैं — सभी Lowercase; Keyword को Identifier नहीं बना सकते
- Identifier Rules: शुरुआत Alphabet या Underscore(_) से (Number से नहीं); अधिकतम लंबाई 31 characters (C/C++); Space allowed नहीं
- ⚠ TRAP
$चिह्न — Java में Valid Identifier character है, C/C++ में NAHI! - White Space Characters = Enter/Space/Tab, इन्हें "Pilcrow" भी कहते हैं
Data Types, Storage Size व Format Specifiers
| Data Type | Size | Format Specifier |
|---|---|---|
| char | 1 Byte (8 bits, ASCII 0-127/256 total) | %c |
| short int | 2 Bytes | %hd |
| int | 2B या 4B (Machine Dependent in C) | %d / %i |
| long int | 4 Bytes | %ld |
| float | 4 Bytes (~7 digit precision) | %f, %g, %e |
| double | 8 Bytes (~15 digit precision) | %lf, %le |
| unsigned int | 2B/4B | %u |
| Pointer | Architecture Dependent | %p / %x |
- Space का ASCII = 32 | NULL Character
\0= ASCII 0 (String Terminator) | Enter ASCII: Windows=13(CR), Unix=10(LF) - String में हमेशा
\0के लिए +1 byte अतिरिक्त:"Hello"= 6 bytes - Octal literal (जैसे
056) 0 से शुरू | Hexadecimal0xAF20x से शुरू - IEEE 754 Scientific Notation:
printf("%e",225.67)→2.256700e+02;printf("%E",-12.5)→-1.250000E+01
Functions व Header Files
| Header | Functions |
|---|---|
| stdio.h | printf(), scanf(), gets(), puts(), fopen(), fclose() |
| stdlib.h | malloc(), calloc(), realloc(), free(), exit(), abs() |
| conio.h | clrscr(), getch(), kbhit() |
| math.h | sqrt(), pow(), sin(), cos(), floor(), ceil() |
| string.h | strlen(), strcpy(), strcmp(), strcat() |
| ctype.h | isalpha(), isdigit(), toupper(), tolower() |
Function के 5 भाग: Name, Parameters, Body/Scope, Return, Argument।
2[array] = array[2] (दोनों समान — Pointer Arithmetic)। C का अनिवार्य Function = main()।पॉइंटर्स (Pointers)
- Pointer = वह Variable जो किसी दूसरे Variable का Address Store करता है (int, char, array, function किसी का भी)
- Size Architecture पर निर्भर: 32-bit=4 Bytes, 64-bit=8 Bytes
&= Address-of Operator (&a= a का address) |*= Dereference/Indirection Operator (*p= address पर मौजूद value)- NULL Pointer:
int* p = NULL;→ 0 address point करता है - Formula:
p=&q; n=*p;⇔n=q; - उपयोग: Dynamic Memory Allocation, Arrays (नाम स्वयं Pointer है), Call by Reference, Multiple Return Values
⚠ TRAP
& = Pointer Initialization में; * = Pointer Declare करने में AND Dereference करने में — दोनों जगह अलग Meaning!डायनामिक मेमोरी एलोकेशन (stdlib.h)
| Function | Arguments | Initialization | काम |
|---|---|---|---|
| malloc(size) | 1 | Garbage (Uninitialized) | Memory Allocate |
| calloc(n,size) | 2 | Zero-Initialized | Contiguous Allocate |
| realloc(ptr,size) | 2 | — | Size Resize |
| free(ptr) | 1 | — | Memory Release |
Dynamic Memory → Heap में | Static (Compile-time) Memory → Stack में। malloc का Return Type
void* — Type Cast चाहिए।ऑपरेटर्स — पूर्ण गाइड
| प्रकार | Symbols |
|---|---|
| Arithmetic | + – * / % |
| Relational | < > <= >= == != |
| Logical | && || ! |
| Bitwise | & | ^ ~ << >> |
| Assignment | = += -= *= /= %= |
| Misc | sizeof, ternary(?:), comma(,), cast |
14/5=2(int/int=int, truncate) |14.0/5.0=2.0|14%5=4| ❗ Exception % (Modulus) केवल Integers पर काम करता है — Real Numbers पर ERROR- Unary Operators पहले Evaluate होते हैं (Binary से पहले), Right से Left Associate होते हैं
- Pre-increment (
++a): पहले Increment फिर Use | Post-increment (a++): पहले Use फिर Increment - ❗ एक ही Expression में Multiple ++/-- = Undefined Behaviour (Compiler Dependent)
- Bitwise:
~(x) = -(x)-1| Left Shift<<= ×2 प्रति shift | Right Shift>>= ÷2 प्रति shift 5<<2=20|7>>3=0(positive, MSB में 0 भरता है) |-5>>2=-2(negative, MSB में 1 भरता है)- XOR:
5^6=3(अलग bits=1, समान bits=0) | Bitwise Operators केवल Integers पर, Real Numbers पर ERROR - Logical: कोई भी +ve/-ve non-zero = TRUE(1); Zero = FALSE(0)
Type Conversion (Implicit vs Explicit)
| Feature | Implicit (Compiler TC) | Explicit (User TC) |
|---|---|---|
| दूसरा नाम | Internal TC | External TC |
| Rule | Widening (छोटा→बड़ा) | Narrowing (बड़ा→छोटा), User (type) cast करता है |
| Risk | No Data Loss | Data Loss संभव |
Widening Order:
char→short→int→long→float→double→long double। (int)7.5=7 (Truncate toward zero, Floor नहीं!) | (int)(-7.5)=-7 (NOT -8)Storage Classes
| Feature | auto | register | static | extern |
|---|---|---|---|---|
| Scope | Local | Local | LV+GV | Global |
| Default Value | Garbage | Garbage | 0 | Depends |
| Lifetime | Function Scope | Function Scope | Program Scope | — |
| Storage | Stack | CPU Register (fastest) | Data Segment | Data Segment |
⚠
register Variable पर & (Address) Operator Use नहीं कर सकते। Static Local Variable = 0 से Initialize होती है और Function Calls के बीच Value Preserve करती है।🔵 OOP Concepts (C++ / Java)
| Concept | अर्थ |
|---|---|
| Encapsulation | Data + Methods को एक Unit(Class) में बांधना |
| Abstraction | केवल आवश्यक जानकारी दिखाना, Implementation छिपाना |
| Inheritance | एक Class दूसरी Class के गुण प्राप्त करती है (Code Reusability) |
| Polymorphism | एक ही नाम, अलग-अलग व्यवहार/Implementation |
- Object = Class का Instance | Class = Objects बनाने की Blueprint
- Global Variable, Friend Class, Repetition — ये OOP Pillars नहीं हैं (Trap Question में बार-बार आता है)
- Default Constructor = बिना Argument वाला | Constructor का कोई Return Type नहीं होता, नाम Class के जैसा होता है
- Abstract Class = जिसमें कम-से-कम एक Pure Virtual Function हो (
virtual void f()=0;) - Operator Overloading = एक Operator को अलग Data Types के लिए अलग Meaning देना
- Ambiguous Constructor: जब Compiler दो Overloaded Constructors में अंतर नहीं कर पाता
- C++ में Private Inheritance से Base की Public Members भी Derived में Private बन जाती हैं
C++ विशेष बिंदु (हैंडलिखित नोट्स से)
- Inline Function: यह Function Call होते ही Code से Replace हो जाता है (कॉपी होकर); Overhead नहीं होता, Program Fast चलता है; Class के अंदर हर Function Default रूप से Inline होने की क्षमता रखता है
- Pointer vs Reference: दोनों Aliasing Technique; Pointer=Address Store करता है+Memory चाहिए; Reference=कोई Address/Memory नहीं चाहिए, Declaration के समय ही Initialize होना चाहिए (बाद में नहीं बदल सकते)
- Namespace: Extra Scope Provide करता है Call के लिए; Access:
A::hi(); New C++ में Default Namespace =std(using namespace std;) - Exception Handling: 3 भाग —
try{},throwstatement,catch(){}method; एक try के साथ Multiple catch() हो सकते हैं; हमेशा एक ही catch match होता है - Formatted Output (C vs C++): C में
printf("%#o",0101)प्रकार के Format flags; C++ में Manipulators (setbase(),hex,oct,setprecision()) — Headeriomanip.h;endl= Manipulator (New Line + Flush),\n= साधारण Line Feed - float में ~7 digit Support, double में ~15 digits Support लेकिन Default print में केवल 6 digits दिखते हैं
☕ Java बेसिक्स
| Term | अर्थ |
|---|---|
| JVM | Java Virtual Machine — Bytecode Execute करता है |
| JRE | JVM + Libraries |
| JDK | JRE + Development Tools |
Flow: Source Code → Java Compiler → Bytecode → JVM → Machine Code
- Applet = विशेष Java Program जो Browser में Dynamic Content बनाता था (अब लगभग अप्रचलित)
Scanner sc=new Scanner(System.in); int n=sc.nextInt();— इनपुट पढ़ने का सही तरीका (readInt/inputInt/getInt अस्तित्व में नहीं)- Array Parameter Declaration:
public void fun(double[] arr) - Java में
0से शुरू संख्या = Octal (जैसे016= Decimal 14) - String/Object Array के Default Elements =
null(Reference Type); Primitive Array Default = 0/false - File Handling:
FileWriterसे लिखने के बादfileWriter.close()चाहिए;java.io.Fileclass Files/Directories Manage करता है - Constructor Chaining:
this(args)से एक Constructor दूसरे को Call करता है - JSP Declaration (
<%! %>) से बना Variable = Instance Variable, Server Life में एक बार Init होता है पर हर Request पर<% %>Scriptlet Run होता है — इसलिए Value हर बार Persist करते हुए बढ़ती है
📄 XML / HTML
- XML = eXtensible Markup Language — Hierarchical Data का वर्णन करता है, Database जैसा भी उपयोग हो सकता है; XML Document Version Declaration से शुरू, फिर Root Element
- XLink/XLL = अन्य XML Documents से Link करने के लिए
- HTML = Hyper Text Markup Language, Hyperlink Tag:
<a href=""> - HTML बनाने के लिए Text Editor चाहिए, Browser केवल Display करता है
🚨 Answer Key Bugs / Source Conflicts
| प्रश्न | दी गई Answer | समस्या |
|---|---|---|
| Logical Operators कौन से हैं? | >,<,= | ये वास्तव में Relational Operators हैं, Logical नहीं (&&,||,!) |
| C में User Defined Function किस Keyword से लिखा जाता है? | define | C में User-Defined Function के लिए कोई विशेष Keyword होता ही नहीं — प्रश्न त्रुटिपूर्ण |
| Dynamic Web Pages के लिए सबसे उपयुक्त Software | Ruby | Ruby एक Programming Language है, Software नहीं — प्रश्न अस्पष्ट |
| Objects बनाने की Blueprint क्षमता किस OOP Concept में है? | (कोई विकल्प सही नहीं) | सही उत्तर "Class" होना चाहिए था, विकल्पों में नहीं था — प्रश्न त्रुटिपूर्ण |
⚡ Last-Minute One-Liners
- Compiler=Whole Program | Interpreter=Line-by-Line
- FORTRAN=Formula Translation, John Backus
- COBOL=Grace Hopper, Business
- BASIC=John Kemeny, Education
- Pascal=1st OOP Concept | Simula-67=True 1st OOP
- C=Dennis Ritchie, 1972, Bell Labs, Middle Level
- C ka Old Name=NB(New B), Predecessor=B
- 32 Keywords in C, exactly
- Identifier: Alphabet/_ से शुरू, max 31 chars, no $ (C में)
- $ sign → Java में Valid, C में नहीं
- Phases: Edit(.c)→Preprocess(.i)→Compile(.obj)→Link(.exe)
- malloc=garbage,1 arg | calloc=zero,2 args
- free()=Heap Memory Release
- &=Address-of | *=Dereference
- % only Integers, Real Number पर Error
- (int)typecast=Truncate toward zero
- Static default=0 | Auto/Register default=Garbage
- register variable पर & नहीं चल सकता
- Widening=Implicit(Safe) | Narrowing=Explicit(Data Loss)
- Encapsulation=Bind | Abstraction=Hide
- Class=Blueprint | Object=Instance
- C++ Class Default=Private | Struct Default=Public
- Constructor=No Return Type
- Abstract Class=Pure Virtual Function
- JVM=Java Virtual Machine
- Java Compiler→Bytecode→JVM→Machine Code
- Scanner.nextInt() Java Input
- 0-prefix Number in Java=Octal
- String Array Default=null
- XML=eXtensible Markup Language
- HTML Hyperlink=<a href>
- Space ASCII=32, NULL char ASCII=0
- String +1 byte for \0
- i++ = i=i+1
- Assembler=Assembly→Machine only
- Java/Python int=4B Fixed; C/C++ int=Machine Dependent
यह हैंडबुक Quiz 1-6 (Rajasthan Gyan), RSMSSB BCI Ultimate Handbook, Sanfoundry C/C++/Java Quiz, और हैंडलिखित नोट्स को समेकित करती है। नए Quiz/Paper डालने पर यही Document Update होता रहेगा — बार-बार रिवाइज़ करें।
Rajasthan Exam Twister Research DeskSyllabus Verified
Curated by competitive exam specialists in Jaipur, Rajasthan. Facts, historical dates, and revision bullet points are strictly verified against official RPSC, RSSB, and Hindi Granth Academy reference materials.
Official Telegram Community
राजस्थान प्रतियोगी परीक्षाओं के संपूर्ण PDF नोट्स पाने के लिए जुड़ें
REET, RPSC, CET, Patwar व Rajasthan Police परीक्षा हेतु डेली 10 फ्री क्विज़ पोल, हस्तलिखित नोट्स व मॉडल पेपर्स टेलीग्राम पर प्राप्त करें।
डेली फ्री क्विज़ पोलहस्तलिखित PDF नोट्सऑफ़िशियल अपडेट्स
Rajasthan Exam Twister
Comprehensive Preparation for Rajasthan Exams
Review detailed blog breakdowns, previous year papers, and topical revision handbooks.