aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Python Programming Beginners Quiz
  • Which of these variables is a string?
Multiple choice

Which of these variables is a string?

  1. name = "Hello!"

  2. string = 33

  3. name = 3.22

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A string is a sequence of characters enclosed in quotes. 'name = "Hello!"' correctly assigns a string literal to a variable.

Keep practicing — related questions

  • What will be the output of the program? String a = "newspaper"; a = a.substring(5,7); char b = a.charAt(1);...
  • What will be the output of the program? public class If1 { static boolean b; public static void main(String...
  • The shape of a cell can be variable. Which of the following organisms exhibit(s) variable cell shapes? a. A...
  • Which of the following B-lymphocytes are responsible for secreting antibodies into the blood circulation? a...
  • What will be the output of the following code snippet? main() { int a=1,b=1; clrscr(); a=++a||++b&&++a; pri...
  • public class Myfile { public static void main (String[] args) { String biz = args[1]; String baz = args[2];...
  • Choose the option that has correctly matched Column A with Column B: | || |---|---| |Column A|Column B| |1....
  • What will be the output of the code snippet? int funct(a,b) int a,b; { return a*b; } void main() { int i=13...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy