FILLING THE CODE

x=10
def display():
x=11
return x+1
display()
print(x)
10
11
12
Error
 #include <stdio.h>
int main()
{
int a = 1888;
if ((a % 4 == 0) ___ (a % 100 != 0)) ___ (a % 400 == 0))
{
printf("LEAP YEAR");
}
else
{
printf("Not a LEAP");
}
return 0;
}
&& and ||
^ and |
& and |
!= and &&
#include <stdio.h>
long power (int, int); int main()
{ int pow, num; _____ result;
printf("Enter a number: "); scanf("%d", &num); printf("Enter it's power: "); scanf("%d", &pow); result = power(num, pow); printf("%d^%d is %ld", num, pow, result); return 0; } long power (int num, int pow)
{ if (pow) { return (num * power(num, pow - 1)); } return 1; }
Int
Long
Short
Byte
s = 'Spam, eggs, & ham'
f = s.find(------)
print(f)
What should be inside the blank space to get the output -1.
Spam
Eggs
Ham
None of these
a, b = '12'
b, c = '34'
print(a + b + c)
 
What is the Output?
123
134
234
341
set_a = {1, 2, 3}
set_b = {2, 3, 4}
print(set_a------set_b)
 
Which operator is Used to give the following Output {2,3} ?
How would you make it so that:
text = 'Python'
becomes: 'Pyt-hon'
 
Text.insert('-', 3)
Text[3] = '-'
''.join([text[3:], '-', text[:3]])
''.join([text[:3], '-', text[3:]])
my_list = ['h','e','l','l','o']
print(len(my_list))
 
5
6
4
Can’t be determined using[]
text = 'spam-eggs-ham'
print(text.split('-',____))
What should be inside the blank space to get the output ['spam','eggs-ham'].
0
1
2
None of these
def func(_____):
func(a=1, b=True, c='Hello')

What should be inside the blank space to pass as the parameters?
*kwargs
**kwargs
*args
**args
from datetime import datetime
date = datetime(1991, 2, 20)
print(f'{date:%d/%m/%Y}')

What should be inside the blank space to get the output as
20/02/1991.
Y
Y
Year
All of these
print(f'2 * {(____ := 10)} is {2 * ____}')
What should be inside the blank space to get the output 2 * 10 is 20.
A Variable
Syntax error
Name error
10
print(-10 / (20 / 2 ___ 2 * 5 / 5) * 8 - 2)
What should be inside the blank space to get the output -18.0.
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
int I, j, flag = 0;
printf("Enter a string: ");
gets(str);
j = strlen(str) - 1;
for (i = 0; I < j; i++) {
if (str[i] ______str[j]) {
flag = 1;
break;
}
j--;
}
if (flag == 0)
printf("%s is a palindrome.\n", str);
else
printf("%s is not a palindrome.\n", str);
return 0;
}
Double Equal
Double And
Not Equal
None of these
#include <stdio.h>
int main() {
int num1, num2, I, gcd;
printf("Enter two positive integers: ");
scanf("%d %d", &num1, &num2);
for (i = 1; I <= num1 _____ I <= num2; ++i) {
if (num1 % I == 0 && num2 % I == 0)
gcd = I;
}
printf("GCD of %d and %d is %d\n", num1, num2, gcd);
return 0;
}
#include <stdio.h>
int main() {
int a = 5, b = 7;
a = a ___ b;
b = a ___ b;
a = a ___ b;
printf("a = %d, b = %d\n", a, b);
return 0;
}
#include <stdio.h>
int main() {
int num = 12345, reversed = 0;
while(num != 0) {
reversed = reversed __10 + num ___10;
num __= 10;
}
printf("Reversed number is %d\n", reversed);
return 0;
}
*,/,%
+,/,%
*,+,/
*,%,/
int main() {
int a = 5, b = 7, c = 2;
int largest = (a > b ___ a > c) a : (b > c) ? b : c;
printf("The largest number is %d\n", largest);
return 0;
}
&&
||
^^
?
int main()
{
int x = 10;
int y = 10;
if ( !(x __ y) )
printf(" x is equal to y ");
else
printf(" x is not equal to y ");
return 0;
}
int main()
{
printf(__\"CoputerScience\"__);
return 0;
}
 
What should be filled in the blank space to get the output "CoputerScience"?
" , "
\,\
\, "
" ,\
public class ReverseString {
public static void main(String[] args) {
String original = "Hello World";
String reversed = new StringBuilder(original).reverse().______();
System.out.println("Reversed: " + reversed);
}
}
 
Fill in the blank space to get the output Reversed: dlroW olleH.
ToReverse
ToString
String
None of the above
{"name":"FILLING THE CODE", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"x=10def display():x=11return x+1display()print(x), #include int main(){int a = 1888;if ((a % 4 == 0) ___ (a % 100 != 0)) ___ (a % 400 == 0)){printf(\"LEAP YEAR\");}else{printf(\"Not a LEAP\");}return 0;}, #include long power (int, int); int main() { int pow, num; _____ result;printf(\"Enter a number: \"); scanf(\"%d\", &num); printf(\"Enter it's power: \"); scanf(\"%d\", &pow); result = power(num, pow); printf(\"%d^%d is %ld\", num, pow, result); return 0; } long power (int num, int pow) { if (pow) { return (num * power(num, pow - 1)); } return 1; }","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Make your own Survey
- it's free to start.