Skip to content

Instantly share code, notes, and snippets.

@asimnajam
Created February 21, 2022 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asimnajam/4fea5c93c06184ddecb2fa6c69a8d2ad to your computer and use it in GitHub Desktop.
Save asimnajam/4fea5c93c06184ddecb2fa6c69a8d2ad to your computer and use it in GitHub Desktop.
Multiple Choice Question JSON
{
"questions":[
{
"id": 0,
"query":"We can return multiple values from a function using?",
"answers":[
{
"correct":true,
"title":"Tuple"
},
{
"correct":false,
"title":"Array"
},
{
"correct":false,
"title":"Both 1st & 2nd"
},
{
"correct":false,
"title":"None"
}
]
},
{
"id": 1,
"query":"Given : var stringValue:String = “Justin Gif”. What is the result of stringValue = nil?",
"answers":[
{
"correct":false,
"title":"stringValue == nil"
},
{
"correct":true,
"title":"the compiler won't allow it"
},
{
"correct":false,
"title":"stringValue == “Justin Gif”"
},
{
"correct":false,
"title":"None"
}
]
},
{
"id": 2,
"query":"What character is used to denote an Optional type",
"answers":[
{
"correct":false,
"title":"?"
},
{
"correct":false,
"title":"!"
},
{
"correct":true,
"title":"Both 1st & 2nd"
},
{
"correct":false,
"title":"None"
}
]
},
{
"id": 3,
"query":"How do you declare a mutable Integer array?",
"answers":[
{
"correct":false,
"title":"let arr = [Int]()"
},
{
"correct":true,
"title":"var arr: [Int] = []"
},
{
"correct":false,
"title":"var arr: [Int?]"
},
{
"correct":false,
"title":"Both 2nd & 3rd"
}
]
},
{
"id": 4,
"query":"What keywork do you use to not own a reference in Swift?",
"answers":[
{
"correct":false,
"title":"weak"
},
{
"correct":false,
"title":"strong"
},
{
"correct":false,
"title":"unowned"
},
{
"correct":true,
"title":"Both 1st & 3rd"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment