Computer Science MCQs · REACT In React, 'lifting state up' means: A Copying state into every child component B Moving shared state to the closest common parent Correct answer C Moving state into a global window variable D Storing all state in the browser's localStorage MCQSEXAM Show answer Read explanation
Computer Science MCQs · REACT What is the virtual DOM in React? A A browser feature that replaces the real DOM B An in-memory copy React diffs to update the real DOM Correct answer C A CSS layer that hides components until they load D A server that pre-renders every page in advance MCQSEXAM Show answer Read explanation
Computer Science MCQs · REACT When useEffect is given an empty dependency array ([]), the effect runs: A Never, because nothing is being watched B Before every render of the component C After every render of the component D Only once, after the first render Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · REACT Which React hook stores a mutable value that persists across renders without causing a re-render? A useEffect B useRef Correct answer C useState D useMemo MCQSEXAM Show answer Read explanation
Computer Science MCQs · REACT Why does React need a key prop when rendering a list of elements? A To identify items so updates are efficient Correct answer B To make each list item clickable by default C To set the order in which items are styled D To store the item's data in local storage MCQSEXAM Show answer Read explanation
Computer Science MCQs · Dot NET In .NET, what should an async method that produces no result usually return? A Thread B IAsyncResult C Task Correct answer D void MCQSEXAM Show answer Read explanation
Computer Science MCQs · Dot NET What is NuGet used for in .NET development? A Compiling C# code into CIL B Profiling memory leaks at runtime C Managing third-party library packages Correct answer D Hosting web apps on IIS servers MCQSEXAM Show answer Read explanation
Computer Science MCQs · Dot NET In .NET, a struct is a: A Value type Correct answer B Pointer type C Delegate type D Reference type MCQSEXAM Show answer Read explanation
Computer Science MCQs · Computer Graphics Roughly how much memory does a frame buffer need for a 1920 × 1080 display with 24-bit colour? A About 6.2 MB Correct answer B About 18.7 MB C About 2.1 MB D About 49.8 MB MCQSEXAM Show answer Read explanation
Computer Science MCQs · Computer Graphics Which line-clipping algorithm assigns a 4-bit region code to each endpoint? A Weiler–Atherton B Sutherland–Hodgman C Cohen–Sutherland Correct answer D Liang–Barsky MCQSEXAM Show answer Read explanation
Computer Science MCQs · Computer Graphics Using homogeneous coordinates, 2D transformations such as translation are represented by matrices of size: A 2 × 2 B 3 × 3 Correct answer C 2 × 3 D 4 × 4 MCQSEXAM Show answer Read explanation
Computer Science MCQs · Computer Graphics Which colour model is subtractive and used mainly in printing? A RGB B HSV C YUV D CMYK Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · Computer Graphics Bresenham's algorithm is used to: A Fill polygons with gradient colours B Compress images for faster display C Draw lines using only integer arithmetic Correct answer D Remove hidden surfaces in 3D scenes MCQSEXAM Show answer Read explanation
Computer Science MCQs · Artificial Intelligence (AI) and Machine Learning (ML) The A* search algorithm ranks nodes using which evaluation function? A f(n) = g(n) − h(n) B f(n) = g(n) only C f(n) = h(n) only D f(n) = g(n) + h(n) Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · Artificial Intelligence (AI) and Machine Learning (ML) As a model becomes more complex, what typically happens to bias and variance? A Bias rises and variance falls B Both bias and variance fall C Both bias and variance rise D Bias falls and variance rises Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · Artificial Intelligence (AI) and Machine Learning (ML) The k-means algorithm is an example of: A Feature scaling B Clustering Correct answer C Regression D Classification MCQSEXAM Show answer Read explanation
Computer Science MCQs · Artificial Intelligence (AI) and Machine Learning (ML) The Turing Test, proposed in 1950, checks whether a machine can: A Hold a conversation indistinguishable from a human's Correct answer B Recognise faces more accurately than people C Solve mathematical problems faster than humans D Learn to play chess without being programmed MCQSEXAM Show answer Read explanation
Computer Science MCQs · Artificial Intelligence (AI) and Machine Learning (ML) Which type of machine learning trains on labelled input–output examples? A Association rule mining B Unsupervised learning C Supervised learning Correct answer D Reinforcement learning MCQSEXAM Show answer Read explanation
Computer Science MCQs · Cascading Style Sheets - CSS Which media query applies styles only to viewports 768px wide or narrower? A @media (max-width: 768px) Correct answer B @media (max-height: 768px) C @media (min-width: 768px) D @media (min-height: 768px) MCQSEXAM Show answer Read explanation
Computer Science MCQs · Cascading Style Sheets - CSS Which CSS unit is relative to the font size of the root (html) element? A vmin B ch C rem Correct answer D em MCQSEXAM Show answer Read explanation
Computer Science MCQs · Cascading Style Sheets - CSS In Flexbox, which property aligns items along the main axis? A align-content B justify-content Correct answer C flex-direction D align-items MCQSEXAM Show answer Read explanation
Computer Science MCQs · Cascading Style Sheets - CSS Which CSS property controls the stacking order of overlapping positioned elements? A order B float C position D z-index Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · JAVA String s = "Hi"; s.concat("!"); What is the value of s after these statements? A "Hi" Correct answer B "!" C "Hi!" D null MCQSEXAM Show answer Read explanation
Computer Science MCQs · JAVA A class must implement which interface to be used in a try-with-resources statement? A Iterable B AutoCloseable Correct answer C Runnable D Serializable MCQSEXAM Show answer Read explanation
Computer Science MCQs · JAVA What is the size of the char data type in Java? A 16 bits Correct answer B 32 bits C 4 bits D 8 bits MCQSEXAM Show answer Read explanation