1What happens when this code runs?
char *p = "hi";
p[0] = 'H';Data types, operators, pointers and undefined behaviour.
Programming / C Programming
Data types, operators, pointers and undefined behaviour.
char *p = "hi";
p[0] = 'H';int x = 5;
printf("%d", x++ + ++x);#define SQR(x) x*x
printf("%d", SQR(2+1));union U {
int i;
char c;
};struct S {
char c;
int i;
};char *p = "abc";
printf("%c", *(p + 1));int a = 10;
int *p = &a;
*p = 20;
printf("%d", a);int a[5];
&a[4] - &a[1]int a[] = {1, 2, 3};
int *p = a;
p++;
printf("%d", *p);int x = 5, *p = &x;
printf("%d", *p);char *p = "hi";char s[10] = "hi";
printf("%zu", strlen(s));int a[2][3];
printf("%zu", sizeof(a));char s[] = "abc";
printf("%zu", sizeof(s));printf("%zu", sizeof("hello"));int a[3] = {10, 20, 30};
printf("%d", *(a + 1));int a[] = {1, 2, 3};
printf("%zu", sizeof(a) / sizeof(a[0]));int a[5] = {1, 2};int x = 10;
{
int x = 20;
printf("%d ", x);
}
printf("%d", x);Comprehensive Question Hub
Select any core Computer Science or programming subject below to access dedicated practice questions, answers, and topic-wise modules.
Fundamental CS engineering subjects covering systems, theory, and data architecture.
Practice coding output questions, language syntax, OOP paradigms, and standard libraries.
Prepare with exam-specific question banks tailored to syllabi, previous years' question papers, and negative-marking criteria.
Practice BPSC TRE 2.0 Class 11-12 Computer Science previous-year questions with solutions.
Practice BPSC TRE 3.0 Class 11-12 Computer Science previous-year questions with solutions.
Practice BPSC TRE 4.0 Class 11-12 Computer Science previous-year questions with solutions.
Practice Bihar STET Paper II Class 11-12 Computer Science questions with solutions.
High-yield engineering questions covering Algorithms, Theory of Computation, Compiler Design, Computer Organization, and Operating Systems.
Comprehensive question sets aligned with NTA UGC NET Paper II syllabus, featuring theoretical foundations, discrete math, and systems.
Foundational and practical MCQs for technical assistants, programmers, and informatics officers in central and state departments.
A modern, high-yield practice platform designed to build speed, accuracy, and deep conceptual clarity.
Receive immediate validation with step-by-step technical explanations and code breakdown so you learn from mistakes on the spot.
Simulate authentic exam environments with dedicated Full-Screen mode, keyboard shortcuts (1-4, A-D, Enter), and a live question matrix.
Explore modular practice sets across Data Structures, Algorithms, DBMS, Operating Systems, Computer Networks, and modern programming languages.
Solve authentic previous year questions adapted from BPSC TRE Computer Science, GATE CSE, and UGC NET question papers.
MCQ practice is most effective when paired with structured conceptual tutorials, career roadmaps, and full-length timed mock tests. Check out CodeZov's free resources to boost your preparation.
Answers to common questions about practicing Computer Science MCQs on CodeZov.
Multiple-Choice Questions (MCQs) are objective assessment questions where learners select the correct option from multiple choices. In Computer Science, MCQs evaluate theoretical understanding, code snippet outputs, algorithm time complexities, and system architecture fundamentals.
Yes, CodeZov offers 100% free online Computer Science MCQ practice with instant scoring, step-by-step explanations, code execution analysis, and Hindi translations without requiring mandatory registration or fees.
Yes, all questions on CodeZov are systematically organized by subject (such as DBMS, Operating Systems, Data Structures) and further categorized into specific topics (such as Trees, Normalization, CPU Scheduling, and TCP/IP) for focused preparation.
Every MCQ on CodeZov features verified correct answers alongside in-depth conceptual explanations. Many questions also include bilingual Hindi explanations and line-by-line code breakdowns to ensure complete conceptual clarity.
CodeZov provides MCQs across over 40 technical subjects including C Programming, C++, Java, Python, Data Structures, Algorithms, DBMS, Operating Systems, Computer Networks, Theory of Computation, Compiler Design, Digital Logic Design, and Software Engineering.
Yes, our question bank is specifically curated for competitive examinations including BPSC TRE Computer Science (Class 11-12), GATE CSE, NTA UGC NET / JRF, ISRO, NIELIT, Kendriya Vidyalaya (KVS/NVS) PGT Computer Science, and university semester exams.