What is the Format specifier used to print a String or Character array in C Printf or Scanf function.?

C Program

Quiz
•
SUDHARSAN P
•
World Languages
•
University
•
3 plays
•
Hard
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
%c
%C
%s
%w
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the Output for the Following code:
#include <stdio.h>
void main()
{
printf("""Hello World""");
}
""Hello World""
Hello World
"Hello World"
error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you convert this char array to string.?
char str[]={'g','l','o','b','y'};
A) str[5] = 0;
B) str[5] = '\0'
C) str[]={'g','l','o','b','y','\0'};
D) All the above
D
A
B
C
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the Output for the Following code:
#include <stdio.h>
int main()
{
int c=5,s=0;
while(c<10)
{
c=c+1;
s=s-2;
}
printf("%d",s);
return 0;
}
10
5
-10
0
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Find how many stars will be printed for below code:
#include <stdio.h>
int main()
{
int a=0;
while(a<25){
if(a>0 || a<=10)
{
printf("*");
}
else if(a>10 || a<=20)
{
printf("*");
}
else if(a>20 || a<=30)
{
printf("*");
}
a++;
}
return 0;
}
35 stars
25 stars
30 stars
20 stars
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the maximum length of a C String.?
A) 32 characters
B) 64 characters
C) 256 characters
D) None of the above
A
B
C
D
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the Output for the Following code:
#include <stdio.h>
int main()
{
int a=0,b=1;
while(a<=10)
{
printf("%d",a);
a=a+2;
a=a-b;
}
return 0;
}
012345678910
12345678910
0123456789
error
Explore all questions with a free account
Similar Resources on Quizizz
19 questions
Extra-episodio 1

Quiz
•
KG - University
25 questions
GLITCH_HUNT-ROUND 1

Quiz
•
University
20 questions
C LANGUAGE A

Quiz
•
University
19 questions
Duolingo phrases

Quiz
•
4th Grade - University
16 questions
French Quiz

Quiz
•
6th Grade - Professio...
15 questions
A1 Unit 1 Grammar & Vocabulary

Quiz
•
University
15 questions
sign language

Quiz
•
KG - Professional Dev...
15 questions
English

Quiz
•
University
Popular Resources on Quizizz
39 questions
Respect and How to Show It

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
Discover more resources for World Languages
20 questions
Summer

Quiz
•
KG - University
19 questions
Minecraft

Quiz
•
6th Grade - Professio...
20 questions
3rd Grade Review

Quiz
•
KG - University
15 questions
Minecraft

Quiz
•
University
52 questions
Logos Trivia

Quiz
•
KG - University
7 questions
New national park celebrates Harriet Tubman's legacy

Interactive video
•
11th Grade - University
8 questions
2 Step Word Problems

Quiz
•
KG - University
20 questions
Disney characters

Quiz
•
KG - Professional Dev...