ANSWERS UPDATED 2026
3MC'sMforM"goodMSoftware"M-MAnswerM-MCorrectM(safeMfromMbugs)
-MComprehensibleM(easyMtoMunderstand)
-MChangeableM(readyMtoMchange)
StaticMCheckingM-MAnswerMTheMcheckingMthatMisMdoneMatMcompilation.
-MBugMautomaticallyMfoundMbeforeMprogramMruns
DynamicMCheckingM-MAnswerMTheMcheckingMthatMisMdoneMatMrunMtime.
-MFoundMautomatically
BenefitsMofMC#M-MAnswerM-Safety
M>MTypeMsafe,MstaticMchecking,MexceptionMhandling,Metc
-MUbiquity
M>MMultiplatform:MMobile,MWeb,MWindows/Mac/Linux
-MElegance
-MPopular
-MPowerful
-MHigh-level
-MModernMobjectMoriented
IssuesMwithMC#M-MAnswerM-MVerbose:MtakesMaMlotMofMcodeMtoMdoMsimpleMtask
-MLarge:MmanyMfeatures
staticMvoidMMain()M-MAnswerMTheMstartingMplaceMofMaMprogram
intMvarNameM=M92;M-MAnswerMDeclaringManMintMtypeMvariable
doubleMVarNameM=M1.45;M-MAnswerMDeclaringMaMdoubleMtypeMvariable
,charMvarNameM=M'*';M-MAnswerMDeclaringMaMcharMtypeMvariable
TwoMcategoriesMofMC#MtypesM-MAnswerM-MValueMtypes
-MReferenceMtypes
C#MoperatorsM-MAnswerM-MarithmeticM(M+,M-,M/,M%M(remainder),M*)
-McomparisonM(==,M!=,M>,M>=,M...)
-MconditionalM(&&,M||,M!)
C#MselectionMstatementsM-MAnswerM-Mif(condition)
-MelseMif(condition)
-MswitchM*anMalternativeMtoMif-elseMstatements
C#MrepetitionMstatementsM-MAnswerM-Mwhile
-Mfor
-Mdo-while
ClassM-MAnswerMTheMmostMimportantMuserMdefinedMtype
-MContainsMtwoMtypesMofMmembers;
>MDataMmembersM(fields,M..)MthatMstoreMtheMdataMwithinMtheM______.
>MFunctionMmembersM(methods,Mconstructors,M...)MthatMperformMoperationsMonMtheMda
ta
MethodsM-MAnswerMAMblockMofMcodeMthatMcontainsMaMseriesMofMstatements.
ArraysM-MAnswerMstoresMaMfixed-sizeMcollectionMofMelements
HowMtoMinitializeManMarrayM-MAnswerMint[]MnameOfVariableM=MnewMint[5];
-MTheMsizeMofMtheM______MisM5.
intM[]MnameOfVariableM=MnewMint[]M{1,M2,M3,M4,M5};
,intM[]MnameOfVariableM=M{1,M2,M3,M4,M5};
WhatMisMaMDataMType?M-
MAnswerMAM_____MisMaMsetMofMvaluesMandMtheMoperationsMthatMareMpermittedMonM
theMvalues
ValueMpre-definedMtypesM-MAnswerM-Mint
-Mlong
-MdoubleM
-Mchar
-Muint
-Mbool
-Mdecimal
-Mbool
-Mbyte
-Msbyte
-Mfloat
-Muint
-Mshort
-Mushort
ReferenceMpre-definedMtypesM-MAnswerM-Mobject
-Mstring
-Mdynamic
AMvalueMtypeM-
MAnswerMThisMtypeMneedsMonlyMoneMallocatedMmemoryMspaceMthatMstoresMtheMactual
Mdata.
AMreferenceMtypeM-
MAnswerMThisMtypeMstoresMtheM*mentionMtoMsomeMotherMmemoryMlocationMwhereMth
eMactualMdataMisMstored.
, TwoMregionsMofMmemoryMthatMstoreMdataM-MAnswerM-Mstack
-Mheap
StackM-MAnswerMlocationMforMstorageMofMvalueMtypes
(last-in,Mfirst-outMdataMstructure)
-MPrimaryMoperations:
M>Mpush()M:MadditionMofManMelementMtoMtheMtopMofMtheMstack
M>Mpop()M:MremovalMofManMelementMfromMtheMtopMofMtheMstack
M>MClear()
M>MRemove()
M>MToArray()
M>MContains()
M>MCount()
HeapM-
MAnswerMTheMreferenceMtypeMisMstoredMinMtheMstackMbutMtheMactualMdataMisMstored
MinMtheM"______"
User-definedMtypesM-MAnswerM-Mclass
-Mstruct
-Marray
NOTE:McanMbeMclassifiedMasMeitherMreferenceMorMvalueMtypes
_______MisMaMtypeMthatMstoresMlogicallyMrelatedMdataMandMfunctionsM-
MAnswerMaMclass
DeclareMaMclassM-MAnswerMclassMnameOfClass
{
//memberMdeclarations
}
AMfieldM-MAnswerM-MStoresMdata