How many times while loop conditions will execute if i is initialised to 0 in both cases
while(i<n)
i++;
-------
do
i++;
while(i<=n);
C LANGUAGE A
Quiz
•
sathwik jilla
•
World Languages
•
University
•
3 plays
•
Hard
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many times while loop conditions will execute if i is initialised to 0 in both cases
while(i<n)
i++;
-------
do
i++;
while(i<=n);
n,n
n,n+1
n+1,n
n+1,n+1
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#define HELLO(a) #a
main()
{
printf(HELLO(good morning));
}
good morning
goodmorning
Option 3
error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the size of the following C structure?
#include <stdio.h>
struct temp
{
int a[10];
char p;
};
5
11
41
44
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code?
#include<stdio.h>
int foo();
int main()
{
int i=foo();
}
foo()
{
printf("2 ");
return 2;
}
2
compile time error
Depends on the compiler
Depends on the standard
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code?
#include<stdio.h>
struct test
{
int i;
char j;
};
main()
{
printf("%d",sizeof(struct test));
}
Error
1
4
8
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code?
#include<stdio.h>
void main(){
int k;
for(k= -3;k<-5;k++)
printf("Hello");
}
Hello
infinite hello
Runtime error
Nothing
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be output of the following code?
#pragma(1)
struct test
{
int i;
char j;
};
main()
{
printf("%d",sizeof(struct test));
}
1
8
Error
4
8.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#define F abc
#define B def
#define FB(arg) #arg
#define FB1(arg) FB(arg)
main()
{
printf(FB(F B));
FB1(F B);
}
F B
Error
FB
"FB"
9.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code?
#include<stdio.h>
void m(int p,int q)
{
int temp=p;
p=q;
q=temp;
}
void main()
{
int a=6,b=5;
m(a,b);
printf("%d %d\n",a ,b);
}
5 6
6 5
5 5
6 6
10.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code?
void main()
{
int i=5,k;
if(i==0)
goto label;
label:printf("%d", i);
printf("Hey");
}
5
Hey
5Hey
Nothing
Explore all questions with a free account
15 questions
Computer Science - Exam 1
Quiz
•
University
19 questions
Extra-episodio 1
Quiz
•
KG - University
20 questions
Penalaran Umum
Quiz
•
12th Grade - University
20 questions
ANTONIM SINONIM
Quiz
•
University
20 questions
CLC Stage 1
Quiz
•
6th Grade - University
20 questions
IT Computer Science Chapter 2 Quiz
Quiz
•
5th Grade - University
20 questions
C Program
Quiz
•
University
15 questions
UAS Praktikum Dasar Pemrograman
Quiz
•
University
17 questions
CAASPP Math Practice 3rd
Quiz
•
3rd Grade
15 questions
Grade 3 Simulation Assessment 1
Quiz
•
3rd Grade
20 questions
math review
Quiz
•
4th Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2425sy
Quiz
•
5th Grade
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
21 questions
6th Grade Math CAASPP Practice
Quiz
•
6th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
22 questions
Spanish subjunctive
Quiz
•
9th Grade - University
20 questions
cinco de mayo
Quiz
•
KG - University
23 questions
Pretérito vs Imperfecto Parte 2
Quiz
•
KG - University
21 questions
Demonstrative Adjectives and Pronouns in Spanish
Quiz
•
7th Grade - University
20 questions
Realidades 6B Vocabulary
Quiz
•
9th Grade - University
16 questions
Por y para
Quiz
•
University
30 questions
AP Spanish Literature & Culture review and format
Quiz
•
11th Grade - University
35 questions
AP Spanish LIterature-35 Obras y Autores
Quiz
•
9th Grade - University