Apni reasoning ko samjhein.
73 optional concept checks. Har choice ki explanation padhein; koi score, timer ya reading lock nahi.
73 topics
Programming kya hai?General
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Computer specified operations follow karta hai, isliye missing decisions explicit hone chahiye.
✓ Sahi reasoning. Program ko handled situations ke rules chahiye; unstated intention instruction nahi hai.
- Computer hamesha programmer ka intention guess karta hai.
Programmer ka intended meaning language rules ko replace nahi karta.
- Precise instructions har program correct bana deti hain.
Precision plan express karti hai, par plan mein phir bhi mistake ho sakti hai.
General
Chapter padheinComputer instructions kaise follow karta haiGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, line breaks processor operations define karte hain.
Source layout one-to-one instruction count establish nahi karta.
- Haan, har comment ke liye ek machine instruction required hai.
Comments runtime instructions nahi hain.
- Nahi. Translation aur optimization alag arrangement bana sakti hain.
✓ Sahi reasoning. Particular machine-level trace assume karne se pehle language semantics se reason karein.
General
Chapter padheinCPU, memory, storage aur operating systemGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- RAM aur persistent storage interchangeable hain.
Working memory aur persistent storage ke roles aur persistence alag hain.
- Working memory aur persistent storage ke roles alag hain.
✓ Sahi reasoning. Save karna normally persistent storage mein data likhta hai; working memory mein value rakhna alag operation hai.
- CPU har intermediate value permanently save karta hai.
Operations execute hone se har value ki persistent copy automatically nahi banti.
General
Chapter padheinProgramming languages kyun hoti hainGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan. Grammar follow karna intended logic prove nahi karta.
✓ Sahi reasoning. Syntax, language meaning aur problem requirements alag sawaal hain.
- Nahi, grammar har real-world requirement check karti hai.
Parser har intended requirement nahi jaanta.
- Nahi, accepted code har input par intended answer zaroor dega.
Sirf acceptance aisi correctness guarantee nahi hai.
General
Chapter padheinC kyun banayi gayiGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Unix samet systems software implement karna.
✓ Sahi reasoning. C, Unix ke saath develop hua aur earlier systems-language work se aage badha.
- Har program ko har machine par unchanged chalane ki guarantee.
C ki history program ki implementation aur environment assumptions nahi hataati.
- Har machine-specific operation ko automatic safety checks se replace karna.
C mein bounds, lifetimes aur interfaces par explicit dhyaan dena padta hai.
General
Chapter padheinSource code se running program takC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Complete executable body.
Declaration interface describe karti hai; body definition hoti hai.
- Linking successful hone ki guarantee.
Build ko program ki required definitions phir bhi chahiye.
- Function ke uses check karne ki information.
✓ Sahi reasoning. Suitable declaration calls check karne mein help karti hai, par missing body nahi deti.
C17
Chapter padheinVariables, values aur typesC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- saved automatically apples follow karta hai.
Initializer ne int value copy ki thi; objects ke beech live connection nahi banaya.
- saved apni copied value rakhta hai jab tak use separately badla na jaaye.
✓ Sahi reasoning. Objects alag hain. Ek ko badalne se doosre ko assignment nahi hoti.
- saved exist karna band kar deta hai.
apples ko assignment dene se saved ki lifetime end nahi hoti.
C17
Chapter padheinData types, ranges aur representationsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Yeh hamesha 8 hai.
Ek byte mein 8 bits common hain; yeh sizeof(char) ki value nahi.
- Har implementation par sizeof(int) ke barabar hai.
Standard in dono sizes ko equal require nahi karta.
- Yeh 1 hai, C bytes mein measured.
✓ Sahi reasoning. C byte, char ka size hai. CHAR_BIT batata hai us byte mein kitni bits hain.
C17
Chapter padheinDeclarations, initialization aur assignmentC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Initialization initial value deti hai; baad ki assignment existing modifiable object mein value store karti hai.
✓ Sahi reasoning. Dono values se related hain, par language contexts aur rules alag ho sakte hain.
- Assignment har baar naya variable name banati hai.
Existing object ko assign karne se naya identifier introduce nahi hota.
- Har local declaration int ko zero initialize karti hai.
Initializer ke bina ordinary automatic int ko implicit zero nahi milta.
C17
Chapter padheinC ko padhna: tokens, expressions aur statementsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Expressions mein = assignment aur == equality comparison karta hai.
✓ Sahi reasoning. Unke expression roles alag hain. = token initialization syntax mein bhi aata hai; wahan woh assignment expression nahi hota.
- Whitespace decide karta hai ki dono assignment mean karte hain.
Whitespace in operators ko interchangeable nahi banata.
- Compiler programmer ke intention se meaning choose karta hai.
Language ke token aur expression rules unke roles decide karte hain.
C17
Chapter padheinExpressions aur operators: precedence se pehle meaningC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, precedence timeline hai.
Precedence expressions group karti hai; evaluation order ke rules alag hain.
- Nahi. Grouping aur evaluation order alag rules hain.
✓ Sahi reasoning. Parentheses aur precedence expression structure batate hain; sequencing rules required order batate hain.
- Parentheses jodne se unsequenced side effects hamesha fix ho jaate hain.
Sirf grouping se sequencing introduce nahi hoti jab language use specify nahi karti.
C17
Chapter padheinConditions, choices aur loopsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- while check se pehle hamesha ek baar chalta hai.
Yeh while ka rule nahi; body mein enter karne se pehle condition check hoti hai.
- Compiler har loop remove kar deta hai.
Loop behavior program semantics follow karta hai; universal removal rule nahi.
- Pehle check par controlling expression false ho sakti hai.
✓ Sahi reasoning. Initially false condition pehli body execution ko rok deti hai.
C17
Chapter padheinFunctions: inputs, results aur contractsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Pointer value copy hoti hai aur copy shared object refer kar sakti hai.
✓ Sahi reasoning. Function permitted pointed-to object modify kar sakta hai, par parameter alag pointer object hi hai.
- Haan, pointer parameters caller ke pointer variable ke aliases hain.
Pointer parameter value leta hai; us parameter ko assign karna caller ke pointer object ko direct assign nahi karta.
- Pointer argument poori pointed-to allocation copy karta hai.
Pointer value copy karne se referred objects copy nahi hote.
C17
Chapter padheinRecursion: alag calls ko follow kareinC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, branch ki presence har call ko us tak pahunchati hai.
Jo branch reach hi nahi hoti, woh recursion nahi rok sakti.
- Haan, C unlimited call depth guarantee karta hai.
Resource use aur call depth ki unlimited portable guarantees nahi hain.
- Nahi. Calls ko stopping condition ki taraf justified progress aur resource limits chahiye.
✓ Sahi reasoning. Sound reasoning valid inputs, arithmetic, depth aur repeated work bhi consider karti hai.
C17
Chapter padheinComments: C mein intent samjhanaC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Comment whitespace se replace hota hai, jo tokens separate karta hai.
✓ Sahi reasoning. Yeh int aur count ko ek identifier mein nahi jodta.
- Comment declaration se pehle execute hota hai.
Comments translation mein handle hote hain, runtime statements ki tarah execute nahi.
- Characters identifier intcount ban jaate hain.
Comment replacement tokens concatenate karne ke bajay separation deta hai.
C17
Chapter padheinQualifiers: read-only access aur observable effectsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Yeh access path read-only hai, par doosra permitted access original object badal sakta hai.
✓ Sahi reasoning. Isse originally const defined object modify karne ki permission nahi milti.
- Haan, har alias automatically read-only ho jaata hai.
Ek access path qualify karne se saare pointer objects aur types rewrite nahi hote.
- Pointed-to object pointer mein copy hota hai.
Pointer value object ko refer karti hai; object ki copy contain nahi karti.
C17
Chapter padheinStorage classes: duration, scope aur linkageC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Static storage duration aur internal linkage.
✓ Sahi reasoning. Yeh object duration aur identifier linkage batati hain; naam file scope par declared hai.
- Ek function call tak limited automatic duration.
File-scope object ki ordinary automatic duration nahi hoti.
- Naam use hone par fresh dynamic allocation.
Naam refer karna nayi allocation perform nahi karta.
C17
Chapter padheinConstants, constant expressions aur compile-time checksC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, const har compile-time constant facility jaisa kaam karta hai.
Read-only qualification aur integer-constant-expression rules alag concepts hain.
- Nahi. Sirf const qualification woh rule satisfy nahi karti.
✓ Sahi reasoning. Relevant constant-expression context mein allowed form use karein, jaise suitable enumerator ya integer constant.
- Isse n use karne wala har array har context mein invalid hota hai.
Supported facility aur context mein nonconstant bound VLA bana sakta hai.
C17
Chapter padheinKeywords ko unke roles se samjheinC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Poore program ko hamesha turant terminate karna.
Ordinary called function se return karne par normally caller resume hota hai.
- Function body repeat karna.
return current invocation end karta hai, nayi iteration shuru nahi karta.
- Current function invocation finish karna aur required ho to value dena.
✓ Sahi reasoning. Function ka return type aur return statement value ke rules decide karte hain.
C17
Chapter padheinC keyword index: C17 aur C23C17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, har standard library name keyword hai.
Library identifiers aur language keywords alag categories hain.
- Nahi. Yeh <stdio.h> se declared standard library function ka naam hai.
✓ Sahi reasoning. Header declarations deta hai; naam ko language keyword nahi banata.
- Pehli call ke baad hi keyword banta hai.
Function call se identifier ki lexical category nahi badalti.
C17
Chapter padheinObjects aur memoryC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, fixed stack layout har C object ke type ka part hai.
Type universal machine stack layout prescribe nahi karta.
- Nahi. Storage-duration aur lifetime rules woh physical arrangement mandate nahi karte.
✓ Sahi reasoning. Call stack useful common implementation model hai; uski limits batani chahiye.
- Koi local object optimize nahi ho sakta.
Implementation required program behavior preserve karte hue optimize kar sakti hai.
C17
Chapter padheinScope, lifetime aur storage durationC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Object alive rehta hai, par yahan woh naam apne block scope se bahar hai.
✓ Sahi reasoning. Static storage duration aur block scope alag sawaalon ke answers hain.
- Block exit par object destroy hona zaroori hai.
Yeh ordinary automatic storage se related hai, static local ki storage duration se nahi.
- Uska naam globally visible ho jaata hai.
Static storage duration block-scope identifier ko file-scope identifier nahi banati.
C17
Chapter padheinPointers ko samjheinC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- q automatically naye p ko follow karta hai.
Assignment ne pointer value copy ki thi, p par ongoing dependency nahi banayi.
- q apni purani pointer value rakhta hai jab tak separately change na ho.
✓ Sahi reasoning. Pointer objects alag hain, chahe unki values same target refer karein.
- Purana target automatically free ho jaata hai.
Pointer redirect karna apne aap old target ki storage release nahi karta.
C17
Chapter padheinArrays ko samjheinC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- 3
Indices zero se shuru hote hain; index 3 teen elements ke bahar hai.
- Pehli stored value par depend karta hai.
Element values indexing range nahi badalti.
- 2
✓ Sahi reasoning. Element indices 0, 1 aur 2 hain.
C17
Chapter padheinArrays aur pointers ka connectionC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Use one-past bana sakte hain, par dereference nahi.
✓ Sahi reasoning. One-past permitted boundary hai; woh read karne ke liye array element designate nahi karta.
- *(a + 3) read karein kyunki pointer ban sakta hai.
Pointer banane ki permission har dereference ko valid nahi banati.
- Yeh zaroor doosre object ko point karta hai.
C us boundary par doosre usable object ki guarantee nahi deta.
C17
Chapter padheinCharacters, buffers aur stringsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Capacity 3, length 6.
Yeh array element count aur first null se pehle character count ko ulta karta hai.
- Capacity 6, length 3.
✓ Sahi reasoning. Array mein chhe elements hain; strlen terminating null ko count nahi karta aur usse pehle rukta hai.
- Capacity 6, length 6.
Extra zero-initialized elements string ko first null ke aage extend nahi karte.
C17
Chapter padheinText, Unicode, UTF-8 aur localeC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Yeh first null se pehle char elements count karta hai, grapheme clusters nahi.
✓ Sahi reasoning. UTF-8 code points kai bytes use kar sakte hain aur ek visible unit mein kai code points ho sakte hain.
- Haan, har visible letter exactly ek C char hai.
Yeh general Unicode ya UTF-8 guarantee nahi.
- Yeh automatically saara Unicode text decode aur normalize karta hai.
strlen terminating null dhoondhta hai; Unicode normalization operation nahi.
C17
Chapter padheinDynamic memory aur ownershipC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Purani allocation hamesha free ho chuki hoti hai.
Is positive-size failure mein old allocation deallocate nahi hoti.
- Naya teesra element use karne ke liye ready hai.
Failed growth request ne extra space nahi banayi.
- Original allocation, preserved owning pointer se reachable.
✓ Sahi reasoning. Temporary result use karein taaki failed call original allocation access aur release karne wala pointer overwrite na kare.
C17
Chapter padheinMemory mistakes ko samjheinC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Doosre pointer objects automatically update nahi hote.
✓ Sahi reasoning. Ownership aur alias lifetimes ka contract chahiye; ek pointer clear karna sirf us pointer object ko badalta hai.
- Haan, free saare aliases dhoondhkar clear karta hai.
free allocated storage release karta hai; saare pointer objects dhoondhkar rewrite nahi karta.
- Haan, NULL wahi allocation dobara release karta hai.
NULL assign karna assignment hai, doosri deallocation operation nahi.
C17
Chapter padheinStructures: related data ka groupC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Uski poori pointed-to allocation automatically duplicate hoti hai.
Structure assignment automatic deep-copy ownership policy nahi deti.
- Pointer value copy hoti hai, isliye dono members same object refer kar sakte hain.
✓ Sahi reasoning. Ownership ya independent copy ki requirement ke liye extra contract chahiye.
- Original allocation release hoti hai.
Structure assign karna pointer members par apne aap free call nahi karta.
C17
Chapter padheinStructure values aur functionsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Copied structure ke int member ko directly naya integer assign karna.
Woh member separate parameter object ka hai.
- Copied pointer member se permitted write, jab woh ab bhi shared object refer karta ho.
✓ Sahi reasoning. Structure copy karne se pointer members ke referred objects automatically copy nahi hote.
- Koi bhi parameter change caller ki poori structure replace kar deta hai.
Structure parameter separate object hai.
C17
Chapter padheinEnumerations: choices ke naamC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, enum explicitly supplied values ignore karta hai.
Explicit enumerator initializers meaningful hote hain.
- Har read par value change hoti hai.
Enumerator named integer constant hai, runtime counter nahi.
- Nahi. BUSY ko explicitly 7 diya gaya hai.
✓ Sahi reasoning. Sequential defaults explicit initializer override nahi karte.
C17
Chapter padheinUnions aur tagged dataC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Program, apne construction aur access contract se.
✓ Sahi reasoning. Union member assign karna separate tag field automatically update nahi karta.
- Union har separate tag automatically update karta hai.
Ordinary separate tag field ke liye C aisa automatic relationship nahi deta.
- Tag ki need nahi, kyunki har union member ki separate storage hoti hai.
Union members storage share karte hain; intended interpretation ka clear contract chahiye.
C17
Chapter padheinRecords aur aggregates initialize karnaC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Dono mein 1 repeat hota hai.
Partial initializer last explicitly supplied value repeat nahi karta.
- Dono zero se initialize hote hain.
✓ Sahi reasoning. Baaki aggregate elements ko language ki specified implicit initialization milti hai.
- Unmein arbitrary uninitialized values hona zaroori hai.
Is aggregate ka initializer hai; omitted elements uninitialized automatic int jaise treat nahi hote.
C17
Chapter padheinPadding, alignment aur layoutC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, har structure mein sirf meaningful values hoti hain, padding nahi.
Implementation padding insert kar sakti hai; representations aisi general guarantee nahi deti.
- Nahi. Padding aur representations byte comparison ko value equality ke liye unsuitable bana sakti hain.
✓ Sahi reasoning. Program ki intended equality ke according meaningful members compare karein.
- memcmp hamesha member-by-member semantic comparison karta hai.
memcmp bytes compare karta hai, structure members ke meanings nahi.
C17
Chapter padheinFlexible array members ko samjheinC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, array count ke according automatically grow karta hai.
Count assignment storage acquire nahi karti.
- Haan, header ka sizeof har desired payload include karta hai.
Type ka fixed size arbitrary extra payload capacity nahi deta.
- Nahi. Allocation ko separately sufficient checked capacity deni hoti hai.
✓ Sahi reasoning. Count, allocation size aur bounds consistent rakhein; allocate karne se pehle size arithmetic check karein.
C17
Chapter padheinTypes, declarations aur data interfacesC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- a aur b dono.
Star, a ke declarator ka part hai; declaration ke har naam par automatically apply nahi hota.
- Sirf b.
Star, a ke declarator se attached hai.
- Sirf a; b ka type int hai.
✓ Sahi reasoning. Shared type specifier ke saath har declarator separately padhein.
C17
Chapter padheinFunction pointers aur callbacksC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Eventual call compatible function type se honi chahiye.
✓ Sahi reasoning. Cast function ka parameter aur return contract nahi badalta.
- Haan, casting function ke parameter types rewrite karti hai.
Pointer convert karna function definition rewrite nahi karta.
- Haan, har pointer type ki identical call semantics hoti hai.
Object/function pointer roles aur compatible function types phir bhi matter karte hain.
C17
Chapter padheinPreprocessing: source ki preparationC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Dono same tarah runtime branches choose karte hain.
#if preprocessing mein handle hota hai, ordinary runtime statement ki tarah nahi.
- #if preprocessing mein source select karta hai; if ordinary execution mein path select karta hai.
✓ Sahi reasoning. Conditional inclusion batata hai kaunse source tokens later translation mein jaayenge.
- #if har runtime variable ki current value dekh sakta hai.
Preprocessing condition rules future runtime object values access nahi dete.
C17
Chapter padheinMacros: tokens, arguments aur pitfallsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Macro arguments hamesha exactly ek baar evaluate hote hain.
Token substitution function-call jaisi single-evaluation guarantee nahi deta.
- Expansion expression ko ek se zyada baar evaluate kar sakti hai; sequencing bhi matter karti hai.
✓ Sahi reasoning. Replacement tokens aur sequencing inspect karein; invalid expansion ka output assume na karein.
- Parentheses har repeated side effect automatically hata deti hain.
Parentheses grouping improve kar sakti hain, duplicated evaluations nahi hataati.
C17
Chapter padheinHeaders: interface share karnaC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Header include karna hamesha library link karta hai.
Header inclusion aur compiled definitions supply karna alag build concerns hain.
- Header alag running program hai.
Headers inclusion se source dete hain; independent programs ki tarah run nahi hote.
- Translation units ke beech consistent interface share karne ke liye.
✓ Sahi reasoning. Declarations functions ke uses aur definitions check karne wali files mein include ho sakti hain.
C17
Chapter padheinTranslation units aur linkageC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Unke identifiers ki apni translation units mein internal linkage hai.
✓ Sahi reasoning. Same spelling, internal-linkage identifiers ki shared external identity establish nahi karti.
- Haan, har matching spelling ek global object name karti hai.
Scope aur linkage rules matter karte hain; sirf matching text enough nahi.
- static ka matlab hamesha block scope hai.
static file-scope declarations mein bhi ho sakta hai; scope declaration location par depend karta hai.
C17
Chapter padheinLinking aur librariesC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Declaration type checking mein help karti hai; build ko required implementation phir bhi chahiye.
✓ Sahi reasoning. Toolchain library definitions kaise supply karti hai, yeh header inclusion se alag hai.
- Header include karna computer ki har library build karta hai.
Header inclusion source declarations deta hai, universal library-build operation nahi.
- Har C implementation same library command-line flags require karti hai.
Toolchain flags implementation-specific interfaces hain.
C17
Chapter padheinStandard library: facilities aur contractsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, library saare invalid pointers repair karti hai.
Library interface caller ki pointer aur lifetime obligations nahi hataata.
- Haan, header successful resource acquisition guarantee karta hai.
Allocation aur file opening jaise operations phir bhi fail ho sakte hain.
- Nahi. Caller ko function ke argument aur state contracts bhi satisfy karne hote hain.
✓ Sahi reasoning. Bounds, formats, lifetimes aur error handling correct use ka part rehte hain.
C17
Chapter padheinModular programs: contracts aur buildsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Interface header include karna saari definitions automatically supply karta hai.
Header declarations function bodies automatically link nahi karti.
- Caller ko function ka type guess karna chahiye.
Interface check karne ke liye consistent declaration chahiye.
- Header se declarations share karein aur implementation source build mein dein.
✓ Sahi reasoning. Build ko program ki required definitions translate aur connect karni hoti hain.
C17
Chapter padheinArguments, conversion aur environmentC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, argv numeric-looking text automatically convert karta hai.
argv strings deta hai; numeric validation nahi karta.
- Nahi. Parse karke accepted syntax aur range check karein.
✓ Sahi reasoning. Presence, conversion success aur acceptable value range alag checks hain.
- Haan, argc har argument ki numeric value record karta hai.
argc arguments count karta hai; unka numeric content nahi batata.
C17
Chapter padheinVariadic functions: arguments ka agreementC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- float, bina change.
Ellipsis se corresponding arguments par default argument promotions apply hoti hain.
- double.
✓ Sahi reasoning. Receiving variadic code ko promoted-type agreement follow karna chahiye; ise float ke roop mein retrieve na karein.
- Caller ke float object ka pointer.
Yeh value conversion hai, implicit address-taking operation nahi.
C17
Chapter padheinComparison rule se searching aur sortingC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Comparator ko hamesha exactly 1 return karna chahiye.
Comparison rule ko required signs se less, equal aur greater distinguish karna hota hai.
- Saare subtraction results automatically Boolean hain.
Ordinary integer subtraction zero aur one tak restricted nahi.
- Signed subtraction overflow karke valid ordering express karne mein fail ho sakti hai.
✓ Sahi reasoning. Potentially overflowing difference ke bajay safe comparisons aur consistent ordering contract use karein.
C17
Chapter padheinStreams, buffering aur EOFC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Kyunki int hamesha exactly ek visible letter store karta hai.
Purpose function ka return interface preserve karna hai, universal letter representation nahi.
- Jaldi char conversion se return-value check ki required information kho sakti hai.
✓ Sahi reasoning. Return type preserve karein aur interface ke according stream ka EOF/error state inspect karein.
- EOF har file ke end par stored extra character hai.
EOF interface ka integer indicator hai, required stored file character nahi.
C17
Chapter padheinFormatted output aur format contractsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Sirf output kitne characters jaisa dikhna chahiye.
Appearance se conversion ka valid argument type establish nahi hota.
- Sirf variable ke naam se.
Identifier spelling argument ka required type nahi batati.
- Applicable argument promotions ke baad actual argument type se.
✓ Sahi reasoning. Format string contract hai; woh mismatched argument ko generally required type mein convert nahi karti.
C17
Chapter padheinFormatted input: matching aur limitsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Input conversion us result ko store karne se pehle fail ho sakti hai.
✓ Sahi reasoning. Results use karne se pehle expected counted assignments check karein; %n is count mein include nahi hota.
- scanf pehle har destination zero kar deta hai.
Failed conversion destination ko zero initialize karne ka promise nahi karti.
- Width limit valid numeric range guarantee karti hai.
Field width consumed input limit karti hai; yeh general numeric-range validation strategy nahi.
C17
Chapter padheinLines, boundaries aur checked parsingC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, terminating null prove karta hai ki poori line fit hui.
Null termination prove nahi karti ki newline ya poori logical line consume hui.
- Haan, buffer size automatically grow hota hai.
fgets supplied buffer dynamically enlarge nahi karta.
- Nahi. Line end hone se pehle buffer fill ho sakta hai.
✓ Sahi reasoning. Input policy ke according incomplete lines detect aur handle karein.
C17
Chapter padheinFiles open karna, modes aur lifetimesC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Returned pointer NULL hai ya nahi.
✓ Sahi reasoning. NULL open karne ki failure batata hai; use valid stream maankar use karna contract violate karega.
- Returned pointer EOF ke barabar hai ya nahi.
EOF doosre I/O interfaces ka integer macro hai, fopen ka failure pointer nahi.
- Sirf filename mein dot hai ya nahi.
Filename ka appearance opening successful hone ka proof nahi.
C17
Chapter padheinBlock I/O, positions aur update streamsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Successfully written elements ki count.
✓ Sahi reasoning. Result elements count karta hai. Element size ek byte ho to yeh seedha byte count bhi deta hai.
- Hamesha total requested bytes ki count.
Result completed elements batata hai aur short ho sakta hai.
- Guarantee ki later flush ya close fail nahi ho sakta.
Buffered output mein later errors aa sakte hain; yahan ki success woh broader guarantee nahi.
C17
Chapter padheinErrors, status, errno aur assertionsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, har successful function errno reset karta hai.
Successful functions generally errno clear karne ka promise nahi karti.
- Haan, errno har function ki return value replace karta hai.
Har interface apna error indication aur errno kab meaningful hai, define karta hai.
- Nahi. Us function ke documented failure indication aur errno rules follow karein.
✓ Sahi reasoning. Value kisi earlier operation se bachi ho sakti hai.
C17
Chapter padheinOwnership, cleanup aur partial workC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Har imagined resource release karein, jo acquired hi nahi hua use bhi.
Cleanup actual acquisition state aur API contract follow kare.
- Turant return karein aur pehle resource ka owner koi na rahe.
Ownership kho dene se pehla resource leak ho sakta hai.
- Ownership contract ke according pehla resource release ya transfer karein.
✓ Sahi reasoning. Partial work mein bhi already acquired resources ki cleanup obligations hoti hain.
C17
Chapter padheinDates, clocks aur time measurementC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Hamesha calendar date, Unix seconds mein.
Calendar time aur time_t representation, clock ke interface se alag hain.
- Program ka used processor time, general wall-clock stopwatch nahi.
✓ Sahi reasoning. Interface ki limits ke saath availability check karein aur CLOCKS_PER_SEC se conversion karein.
- Executed source lines ki count.
Yeh clock interface source-line count report nahi karta.
C17
Chapter padheinBehavior, guarantees aur undefined behaviorC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Ki operation portable hai.
Ek observed outcome language guarantee nahi bana sakta.
- Sirf ki is run mein yeh observation mila.
✓ Sahi reasoning. Undefined behavior ke liye C standard requirements impose nahi karta; sahi dikhta run operation validate nahi karta.
- Ki compiler ko har baar warning deni hogi.
Har possible undefined behavior ke liye diagnostic required nahi.
C17
Chapter padheinEvaluation order aur side effectsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Dono operands hamesha kisi bhi order mein chalte hain.
Right operand conditionally evaluate hota hai, left ke baad.
- Left operand pehle evaluate hota hai; right sirf left nonzero ho tab evaluate hota hai.
✓ Sahi reasoning. Logical-AND operator short-circuit evaluation aur sequencing deta hai.
- Right operand hamesha pehle chalta hai.
Yeh is operator ka required evaluation relationship ulta karta hai.
C17
Chapter padheinEffective types, aliases aur accessC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Cast automatically destination type ka naya object bana deta hai.
Pointer ka type badalna generally naya pointed-to object create nahi karta.
- Cast har possible access type valid bana deta hai.
Language restrict karti hai ki kaunse types object ki stored value access kar sakte hain.
- Lifetime, access-type rules aur bounds ko bhi operation permit karna chahiye.
✓ Sahi reasoning. Character-type representation access arbitrary typed reads ki unrestricted permission nahi deta.
C17
Chapter padheinPortability aur explicit assumptionsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Suitable type available hone par implementation exact-width typedef deti hai.
✓ Sahi reasoning. Implementation ki facilities check kiye bina optional exact-width type assume na karein.
- Haan, int ka exactly 32-bit hona required hai.
C17 universal 32-bit int require nahi karta.
- Haan, koi bhi header include karne se saari integer widths ban jaati hain.
Header unsupported integer representation create nahi kar sakta.
C17
Chapter padheinFloating-point calculations aur math functionsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, exceptions aur math_errhandling kabhi matter nahi karte.
Implementation ki advertised error-handling facilities matter karti hain.
- Haan, har finite result prove karta hai ki domain ya range issue nahi tha.
Is general shortcut ke bajay relevant function aur error contract inspect karein.
- Nahi. math_errhandling aur relevant function ke result/error rules follow karein.
✓ Sahi reasoning. Applicable errno aur floating-point exception reporting implementation contract ke according handle karein.
C17
Chapter padheinDefensive C aur security boundariesC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Claimed length ko capacity check kiye bina trust karein.
Supplied length bhi input hai; woh receiving buffer ki bounds violate kar sakti hai.
- Operation safe banane ke liye buffer rename karein.
Names intent communicate karte hain, valid copy enforce nahi karte.
- Copy contract ke liye length, capacity aur required arithmetic validate karein.
✓ Sahi reasoning. C string required ho to contract mein terminator ki space bhi account karein.
C17
Chapter padheinExternal data formats: bytes ka agreementC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Layout, padding, byte order aur representations ka explicit format agreement phir bhi chahiye.
✓ Sahi reasoning. Fields aur encoding define karke unhe deliberately serialize aur validate karein.
- Haan, binary mode har structure ka layout standardize karta hai.
Binary mode universal structure representation impose nahi karta.
- Haan, sirf sizeof poora external protocol describe karta hai.
Local byte size bytes ke meanings ya encoding specify nahi karta.
C17
Chapter padheinThreads, atomics aur shared stateC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, volatile thread lock hai.
volatile mutex nahi aur apne aap atomicity ya synchronization nahi deta.
- Nahi. Suitable synchronization ya atomic-access design phir bhi chahiye.
✓ Sahi reasoning. Conflicting unsynchronized non-atomic accesses data race bana sakte hain.
- Har access indivisible operation ban jaata hai.
volatile generally ordinary operations ko atomic operations nahi banata.
C17
Chapter padheinDiagnostics, debugging aur evidenceGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Exercised executions mein covered problem report nahi hui.
✓ Sahi reasoning. Yeh useful evidence hai, par har input, path ya tool limitation ke liye proof nahi.
- Har possible execution valid C hai.
Finite test run har possible execution explore nahi karta.
- Implementation ko ab language rules ki need nahi.
Tools language rules ko support karte hain; replace nahi.
General
Chapter padheinStyle, contracts aur code reviewGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, formatting resources automatically release karti hai.
Formatting runtime cleanup nahi karti.
- Nahi. Woh contract communicate karte hain, par use design aur follow karna phir bhi zaroori hai.
✓ Sahi reasoning. Readable code reasoning aasaan karta hai; har operation automatically correct nahi banata.
- Haan, descriptive pointer name uski lifetime prove karta hai.
Naam object ke abhi alive hone ka evidence nahi.
General
Chapter padheinC ki timeline: history, editions aur standardsGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Har purana convention modern C mein required hai.
Historical practice aur current language requirement alag hain.
- Editions ke beech rules aur available features alag ho sakte hain.
✓ Sahi reasoning. Example ko portable rule maanne se pehle edition aur assumptions check karein.
- Sirf publication date compiler support prove karti hai.
Implementation support standard ki publication se separately check karna hota hai.
General
Chapter padheinC aisi kyun hai: design aur tradeoffsC17
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Har invalid access runtime par automatically reject hota hai.
C har invalid operation ke liye runtime check promise nahi karta.
- Pointer syntax se bounds jaanne ki need khatam hoti hai.
Pointer value generally complete bounds contract carry nahi karti.
- Program ko bounds, lifetimes aur operation contracts follow karne hote hain.
✓ Sahi reasoning. Direct control tab useful hai jab program valid operations ki required conditions bhi maintain kare.
C17
Chapter padheinC ka influence: languages, runtimes aur interfacesGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Nahi. Us language ke apne type, lifetime aur operation rules seekhein.
✓ Sahi reasoning. Syntax influence identical behavior establish nahi karta.
- Haan, matching braces ka matlab matching memory rules hai.
Sirf braces poori language ka memory model define nahi karti.
- Haan, C se influenced har language mein har C feature hota hai.
Influence selected ideas ka ho sakta hai, poori language ka nahi.
General
Chapter padheinModern C: C23 features aur adoptionC23 adoption
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Sirf source file .c par end hoti hai.
Extension se na language edition establish hoti hai na feature support.
- Ki ek unrelated C23 example compile hua.
Ek feature ka support har language aur library change ka support prove nahi karta.
- Selected language mode aur us feature ka actual compiler/library support.
✓ Sahi reasoning. Language edition aur implementation support alag hain. Documented support aur relevant feature check use karein.
C23 adoption
Chapter padheinComplete programs ko contracts se samjheinGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Uski input assumptions, boundaries, failures aur resource handling.
✓ Sahi reasoning. Observed output bade contract ke baare mein evidence ka ek part hai.
- Sirf variable names doosre example se match karte hain ya nahi.
Sirf names equivalent behavior establish nahi karte.
- Kuch nahi; ek output har execution prove karta hai.
Different inputs aur paths different conditions exercise kar sakte hain.
General
Chapter padheinModel ko aage le jaayein: review aur next stepsGeneral
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Validity conditions ke bina sirf syntax repeat karein.
Conditions samajhne ka part hain ki operation kab use ho sakta hai.
- Batayein kya karta hai, kyun useful hai aur kaunsi conditions use valid rakhti hain.
✓ Sahi reasoning. Meaning, purpose aur limits ko jodna memorized example ke aage reasoning mein help karta hai.
- Assume karein compiler har mistake rok dega.
Compiler diagnostics har invalid operation ya incorrect intention cover nahi karti.
General
Chapter padhein