CrackIT

Create an image of a person sitting at a computer, surrounded by code snippets and error messages, with a focused and determined expression.

Code CrackIT Challenge

Welcome to the CrackIT Code Quiz, designed to test your programming knowledge and debugging skills. With 19 thought-provoking questions, you'll face various coding scenarios in C that challenge your understanding of syntax, logic, and runtime errors.

Join us to:

  • Enhance your coding skills
  • Challenge your logical thinking
  • Learn from your mistakes
19 Questions5 MinutesCreated by DebuggingDolphin42

#include<stdio.h> 

int main(void)

while(.) 

printf("hello"); 

return 0; 

Syntax error
Runtime error
No error
Both a and b are true

#include<stdio.h> 

void main() 

int x = 10; 

int y = 15; 

printf("%d", (x, y))

Runtime error
Syntax error
No error
Both a and b are true

#include<stdio.h> 

void main() 

int n = 9, div = 0; 

div = n/0; 

printf("resut = %d", div); 

Syntax error
Logical Error
Runtime error
Both a and b are true

#include<stdio.h>

int main() 

int I = 0; 

for(i = 0; I < 3; i++); 

printf("loop "); 

continue; 

getchar(); 

return 0; 

Syntax error
Runtime error
No error
Logical error

#include<stdio.h>

void main() 

int a, b, c; 

a + b = c; 

Syntax error
Runtime error
Logical error
Semantic error

#include<stdio.h>

int main()

{

INT num1, num2:

INT a=0;

printf("\nEnter the first number:\t")

scanf("%d", num1); 

while(i<5);

{

printf(“hello debugger”)

i++;

}

 

return 0;

}

 How many lines have error?

2
4
6
8

#include<stdio.h>

int main(){

    int a=8,b=9;

    printf("%d+%d=%d",a,b,a+b);

}

Runtime error
Syntax error
Logical Error
No error

#include<stdio.h>

struct{

int si;

double d;

float cp;

} s;

void main()

{

printf(“%d,%d,%d”,sizeof(s.si),sizeof(s.d),sizeof(s.cp));

}

Syntax error
Output will be 4,8,4
Runtime error
Syntax and runtime error

#include<stdio.h>

int main()

{

int a[4]=25,16;

printf(“%d %d”,a[0]&a[1],a[1] | a[2]);

}

Syntax error because of invalid operator symbol
Output will be 25 16
Output will be 16 16………..
Syntax error because of invalid array initialization

#include<stdio.h>

int main()

{

Static int num =8;

printf(“%d”,num=num-2);

if(num!=0)

main();

}

8 6 4 2
Infinite output
Invalid because main function can't call itself.
6 4 2 0

#include<stdio.h>

How many times “ Cognitia” will print.

int main()

{

 int x;

for(x=-1;x<=10;x++)

{

if(x<5)

continue;

else
break;

printf(“Cognitia”);

}

return 0;

}

Infinite Time
11 Times
0 Time
10 Times
#include<stdio.h>
int main()
{
char arr[7]=”Cognitia”;
printf(“%s”,arr);
return 0;
}
Output: Cognitia
N
Garbage value
Compilation error

#include<stdio.h>

int main()

{

char arr[7]=”Cognitia”;

printf(“%s”,arr);

return 0;

}

Error: in unsigned char statement
Error: unknown file pointer
No error
None of above

#include<stdio.h>

#include<stdlib.h>

int main()

{

    unsigned char;

    FILE *fp;

    fp=fopen("trial", "r");

    if(!fp)

    {

        printf("Unable to open file");

        exit(1);

    }

    fclose(fp);

    return 0;

}

No error : no output
Program crashes at run time
Output: Unable to open file
None of the above
Email:
Email:
{"name":"CrackIT", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Welcome to the CrackIT Code Quiz, designed to test your programming knowledge and debugging skills. With 19 thought-provoking questions, you'll face various coding scenarios in C that challenge your understanding of syntax, logic, and runtime errors.Join us to:Enhance your coding skillsChallenge your logical thinkingLearn from your mistakes","img":"https:/images/course4.png"}
Powered by: Quiz Maker