C/C++ Programming and XML Schema Quiz
Mixed quiz covering C/C++ programming concepts and XML Schema specifications. Note: This quiz should ideally be split into two separate focused quizzes.
Questions
With an extensible Schema definition you cannot:
- Reuse your Schema in other Schemas
- Create your own data types derived from the standard types
- Reference multiple schemas in the same document
- All the above
XML Schema became a W3C Recommendation
- 02. May 2001
- 03. May 2001
- 02. May 2000
- 02. May 2002
A simple element is an XML element that can contain only
- IMAGE
- NUMBER
- TEXT
- ALL OF THE ABOVE
The syntax for defining an attribute is
- <xs:attribute name="xxx" />
- <xs:attribute name="xxx" type="yyy"/>
- <attribute name="xxx" type="yyy"/>
- <xs:attribute name=xxx type=yyy/>
Restrictions on XML elements are called
- cards
- decks
- facets
- faces
How many indicators are present in Schema ?
- 5
- 6
- 7
- 8
One of the greatest strength of XML Schemas is the support for
- data types
- images
- graphics
- functions
With XML Schemas, the sender can ________ the data in a way that the receiver will understand.
- describes
- develops
- designs
- inform
Which of these are not a kind of complex elements
- empty elements
- elements that contain only other elements
- elements that contain only text
- elements that contain only numbers
A default value is automatically assigned to the attributes when no other value is specified.
- FALSE
- TRUE
- NOT ALWAYS
- NONE OF THESE
Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7);
- 10
- 11
- 1
- 0
What does the following code do: int c=0; cout<<c++<<c;
- Undefined
- 01
- 00
- 10
What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&v); cout<<v; }
- Outputs 12
- Outputs 10
- Outputs the address of v
- Undefined
What is the outcome of cout<<abs(-16.5);
- 16
- 17
- 16.5
- Undefined
Can we have a virtual constructor for a class?
- True
- False
What is the functional difference between myObj *x = new myObj[100]; delete x; and myObj *x = new myObj[100]; delete [] x;
- There is none; they both work as expected
- They both do nothing.
- The first will not invoke all myObj destructors
- It would'nt delete all the memory allocated to the objects
Which of the following gives the memory address of a pointer a?
- a
- *a
- &a
- address(a)
Which of the following reads in a string named x with one hundred characters?
- cin.getline(x, 100, '\n');
- cin.getline(100, x, '\n');
- readline(x, 100, '\n');
- read(x);
What does the argument count variable store which is paased to main()?
- the number of arguments
- the number of arguments plus one
- the number of arguments minus one
- The total size of the argument array
Which header file do you need to include to use typecasting?
- stdin.h
- ctype.h
- math.h
- None