TechQuiz

This is a simple game which contains two quizzes. Each quiz is having 10 questions.
First Quiz contains Multiple Choice Questions (MCQs) based on C programming language and the next quiz is of HTML and CSS.

C Programming Quiz

1. Which of the following is true

2. #include <stdio.h>
int main()
{
int i = (1, 2, 3);
printf("%d", i);
return 0;
}

3. #include <stdio.h>
int i;
int main()
{
if (i);
else
printf("Else");
return 0;
}
What is correct about the above program?

4. Which of the following is true about arrays in C.

5. Predict output of following program
int main()
{
int i;
int arr[5] = {1};
for (i = 0; i < 5; i++)
printf("%d ", arr[i]);
return 0;
}

6. What does the following fragment of C-program print?
char c[] = "GATE2011";
char *p =c;
printf("%s", p + p[3] - p[1]);

7. Predict the output of below program:
#include <stdio.h>
int main()
{
int arr[5];
// Assume base address of arr is 2000 and size of integer is 32 bit
printf("%u %u", arr + 1, &arr + 1);
return 0;
}

8. Which of the following is not a valid declaration in C?
1. short int x;
2. signed short x;
3. short x;
4. unsigned short x;

9. Consider the following C program segment:
char p[20];
char *s = "string";
int length = strlen(s);
int i;
for (i = 0; i < length; i++)
p[i] = s[length — i];
printf("%s", p);
The output of the program is?

10. In C, what is the meaning of following function prototype with empty parameter list
void fun()
{
/* .... */
}

HTML, CSS and JavaScript Quiz

1. How is document type initialized in HTML5?

2. What is the full form of CSS?

3. Which of the following attributes is used to add link to any element?

4. Which of the following is the correct CSS syntax?

5. What is the HTML tag under which one can write the JavaScript code?

6. Which one of the following is the correct way of adding Inline styles.

7. What is the purpose of using div tags in HTML?

8. Which of the following is not a reserved word in JavaScript?

9. Where is the correct place to insert a JavaScript?

10. Which of the following attributes is used to open an hyperlink in new tab?