Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online C Programming Quiz Test

Topics Covered

  • Memory Management
  • Pointers
  • Function prototype
  • Decision making - branching & looping
  • Debugging C Programs
  • File handling
  • Advance C ( Used for System Programming such as OS
  • Compilers
  • Kernels etc)

Useful for hiring

  • C Programmers
  • Software Developer (0-2 yrs experience)
  • Senior Software Engineer

Start hiring job-fit candidates using this assessment

GET A DEMO

"Interview Mocha's assessments eliminated reliance on resumes and reduced our time to hire by half. Now we spend time only on relevant candidates and take data-driven hiring decisions."

George Nichkov, Gett,
Global Analytics Team Lead
Question

Consider the following code snippet, first printf statement prints a value 3, what value will be printed by the second printf statement?
(Note: No other new file descriptors are opened while executing this program) 

int main()
{
     int df1= dup(STDOUT_FILENO);
     int df2= dup(STDOUT_FILENO);
     printf("%d", df1);
     printf("%d", df2);
     return 0;
 }

Answer
    • Any positive value

    • Error: Reduntant command

    • 1

    • 4

    • 0

Question

Given the code snippet:
int main() {
    int p1 = fork();
    int p2 = fork();
    if(p1 == 0 || p2 == 0) {
     printf("Hello\n");
    }
  return 0;
}

How many times will Hello be printed?

Answer
    • 1

    • 2

    • 3

    • 4

Question

Predict the output of the given program.

int main()
{
        int c = 0;
        c++;
        int p1 = fork();
        c++;
        int p2 = fork();
        c++;
        if(p2 == 0)
        {
                printf("%d\n", c);
        }
        return 0;
}

Answer
    • 1
      2
      3

    • 2
      3

    • 3
      3

    • 1
      1
      1

Test details:

This C language quiz test enables employers to identify & hire C programmers by evaluating working skills and job readiness. For this reason, the emphasis is on evaluating the knowledge of applied skills gained through real work experience, rather than theoretical knowledge.

The test may contain MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, Whiteboard Questions, Audio / Video Questions, True or False.

Test Details: 20 minutes

10 Application Questions


The combination of Application questions helps to evaluate Technical as well as practical Skills of Candidates.

Test description:

C Programming Quiz helps Recruiters & Hiring Managers to validate the proficiency of candidates in C before an interview. C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope, and recursion, while a static type system prevents many unintended operations. This C language quiz is designed to check the development and programming skills of C Programmer- As per Industry Standards.

The C language quiz test contains questions on following Topics:
 

  • Memory Management

  • Pointers

  • Function prototype

  • Decision making - branching & looping

  • Debugging C Programs

  • File handling

  • Advance C ( Used for System Programming such as OS, Compilers, Kernels etc) 


This C programming online quiz is designed & validated by our experienced subject matter experts (SME)s. Employers can ask the candidate to appear for this C quiz online. Using powerful reporting, you can have a detailed analysis of the test results to help you make a better hiring decision and predict the candidate’s performance.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO