
Programming Quiz

Quiz
•
Computers
•
University
•
Hard
Sridhar Vemula
Used 3+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax for declaring a pointer in C?
int pointer x;
pointer int x;
int *x;
*int x;
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following is a correct way to pass an array to a function in C?
int function(int array[]);
int function(int *array);
int function(int &array);
int function(array[]);
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code snippet?
#include <stdio.h>
int main() {
int x = 5;
printf("%d ", x++);
printf("%d", x);
return 0;
}
5 6
5 5
6 6
6 5
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the value of x after the following code executes?
int x = 10;
x = x << 2;
20
40
5
100
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does this program prints?
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3, 4, 5};
int *ptr = arr + 2;
printf("%d\n", *ptr);
return 0;
}
1
2
3
4
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include<stdio.h>
int main()
{
int a=2,b=7,c=10;
c=a==b;
printf("%d",c);
}
0
7
2
Compilation error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will the result of num1 variable after execution of the following statements?
int j = 1, num1 = 4;
while (++j <= 10)
{
num1++;
}
11
12
13
14
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
pointers and structures

Quiz
•
University
17 questions
Minggu V - PKS 2 - Pemrograman C++

Quiz
•
University
10 questions
C Viva

Quiz
•
University
13 questions
PRF192 C Programming

Quiz
•
University
11 questions
C Programming (Veri Tipi Dönüşümleri)

Quiz
•
University
10 questions
C Program Array and strings

Quiz
•
University
10 questions
Arrays in C (II yr 02.07.2020)

Quiz
•
University
15 questions
CIS1101-programming practice

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University