Maharashtra HSC Computer Science (Bifocal) common mistakes
Maharashtra HSC Computer Science (Bifocal) · Understand the traps and how to avoid them.
Converts binary to hexadecimal by grouping the integer part from the left and the fractional part from the right, for example treating 1101011.01 as 110 1011 . 01, then reports a wrong hexadecimal value.
They remember groups of four but not that place values increase leftward in the integer part and decrease rightward in the fractional part; the grouping direction is not tied to the radix point.
What to do instead
Draw the radix point first. For the integer part, group right-to-left and pad zeros on the left; for the fraction, group left-to-right and pad zeros on the right. Convert each 4-bit group independently and check by converting the result back to binary.
Labels ../notes.txt as an absolute path and C:/school/notes.txt as relative because the first starts with dots and the second contains a folder name.
They match surface features such as punctuation and slashes rather than the definition: whether resolution starts at the file-system root or at the current directory.
What to do instead
Use a rule: absolute paths start at a drive or root, such as C:/ or /; relative paths start from the current working directory and may use . and ... Resolve a relative path by writing the current directory, then applying each .. one level up.
Sums a C/C++ array of n elements with for (i = 1; i <= n; i++) sum += a[i];, reading a[n] and skipping a[0].
Mathematics notation usually starts at 1, and i <= n feels like include all n items, but C/C++ arrays are zero-based and valid indices are 0 to n-1.
What to do instead
Write the valid index range above the loop: 0 to n-1. Use for (i = 0; i < n; i++). Trace the first and last iteration with actual indices; if a problem uses 1-based pseudocode, convert explicitly before coding.
Writes a C function void swap(int a, int b) and expects the caller's variables to exchange values after the call.
They treat parameter names as aliases for the arguments; call-by-value copies values into separate local variables, and those changes disappear at return.
What to do instead
Draw two boxes for the caller variables and two new boxes for the parameters. In C, pass addresses and dereference: void swap(int *a, int *b); call swap(&x, &y). In C++, use reference parameters int &a. Verify with a trace.
Runs binary search directly on an unsorted array and reports not found for a value that is present, blaming the midpoint formula.
They focus on halving and mid calculation, but binary search correctness depends on sorted data; an unsorted array breaks the discard-half invariant.
What to do instead
State the precondition before tracing: the search space must be sorted in the same order as the comparisons. If unsorted, sort first or use linear search. In trace questions, list low, high, mid and the remaining range after each comparison.
Opens a text file with fopen('data.txt','r'), calls fprintf to write records, then says the file contains the new data.
They memorize function names separately from file modes; r means read-only, and the write fails, often silently if the return value is not checked.
What to do instead
Build a mode table: r read, w write/truncate, a append, with + for update. Always check fp != NULL, use the matching function such as fprintf or fscanf, and call fclose(fp). Trace one record and check the return value.
Writes WHERE city = NULL to find rows with missing city, gets zero rows, and concludes the table has no NULL cities.
They treat NULL as an ordinary value equal to itself; SQL uses three-valued logic, and any comparison with NULL yields UNKNOWN, which is not TRUE.
What to do instead
Use IS NULL and IS NOT NULL. For counts, remember COUNT(*) counts rows while COUNT(city) ignores NULLs. Test with a tiny table containing one NULL and one empty string; they are different.
Calls an IP address the physical address and a MAC address the logical address, and says a router forwards a packet across the Internet using only the destination MAC address.
They memorize abbreviations without their layers. MAC is a link-layer address used on the local link; IP is a network-layer logical address used for routing between networks.
What to do instead
Map each address to its layer and scope: MAC is burned into the interface and used within a LAN; IP is assigned logically and routed between networks. A router removes the incoming link-layer frame and uses the destination IP address to choose the next hop, then builds a new frame for the next link. Use ARP to map an IP address to a MAC address on a local network.
Writes p b Important /p /b with overlapping closing tags and img src=pic.jpg without quotes or alt, then assumes the page is correct because the browser still displays something.
HTML is tolerant of some errors, so visual output hides structural mistakes; candidates treat tags as independent formatting commands rather than nested elements with attributes.
What to do instead
Nest tags properly and close the inner element first: p b Important /b /p. Quote attribute values and include required alternative text: img src="pic.jpg" alt="description". Before submitting, check that every opened element is closed in reverse order and every attribute has a quoted value.
States that testing happens only after coding in every SDLC model and that requirements can be changed freely during waterfall development.
They memorize the waterfall sequence as if it were universal and confuse phase order with model choice; waterfall assumes stable requirements, while iterative and incremental models repeat activities.
What to do instead
Compare models by requirement stability and feedback: waterfall is sequential with frozen requirements and phase reviews; iterative, incremental and spiral models repeat design, coding and testing cycles. For a scenario, name the model, justify it from requirement stability and delivery constraints, and place testing both as a phase and as an ongoing activity.