CSCI 3310

A captivating illustration of a computer screen displaying Java code, with graphics of tokens, keywords, and a parse tree visually represented around it, all set in a bright and educational style.

Java Language Fundamentals Quiz

Test your knowledge of Java programming concepts with this engaging quiz! Dive into topics such as tokens, lexemes, context-free grammars, and more to assess your understanding of the Java language.

Whether you are a student learning Java or an experienced programmer looking to refresh your skills, this quiz is for you. Here’s what you can expect:

  • 10 Thought-Provoking Questions
  • Various Question Types: Checkboxes, Multiple Choice, and Text-based
  • Immediate Feedback on Your Answers
10 Questions2 MinutesCreated by CodingHawk127
Which of the following are tokens in Java ?
While
Identifier
Mult_op
}
Which of the following are lexemes in Java ?
Semicolon
++
For
Int_literal
___Context-free grammars were devised by
John Backus
John McCarthy
Peter Naur
Noam Chomsky
Which of the following are nonterminal symbols in the grammar rule: < factor > -> (++ | --) ident | (+|-) (ident | int_literal) | ()
< factor >
Ident
< expr >
+
Which of the following are terminal symbols in the grammar rule: -> (++ | --) ident | (+|-) (ident | int_literal) | ()
Int_literal
Ident
< expr >
++
Consider the following grammar: 
<S> -> <A> a <B> b
<A> -> <A> b | b
<B> -> a <B> | a
Which of the following sentences are in the language generated by this grammar?
 
Baab
Bbaaaaa
Bbbab
Bbaab
Consider the following grammar:
<S> -> a <S> c <B> | <A> | b
<A> -> c <A> | c
<B> -> d | <A>
Which of the following sentences are in the language generated by this grammar?
Abcd
Acd
Acccbd
Accc
Acccbcc
Consider the following grammar:
<assign> -> <id> = <expr>
<id> -> A | B | C
<expr> -> <id> + <expr> 
                |<id> *  <expr>
                | (<expr>)
                | <id>
Show a parse tree for the following statement: A = A * (B + (C * A))
Give a context-free-grammar describing the syntax of the following language L1 = { strings w from alphabet {a,b} | w is of the form an b for n>0}.
Give a context-free-grammar describing the syntax of the following language L1 = { strings w from alphabet {a,b} | w contains an even number of a's and at least one b}.
{"name":"CSCI 3310", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Java programming concepts with this engaging quiz! Dive into topics such as tokens, lexemes, context-free grammars, and more to assess your understanding of the Java language.Whether you are a student learning Java or an experienced programmer looking to refresh your skills, this quiz is for you. Here’s what you can expect:10 Thought-Provoking QuestionsVarious Question Types: Checkboxes, Multiple Choice, and Text-basedImmediate Feedback on Your Answers","img":"https:/images/course5.png"}
Powered by: Quiz Maker