Sybase 11.1 written test is hot

Source: Internet
Author: User
Tags sybase

2008 SJTU

Multiple choice questions:

Pick a few typical examples

Multiple choice questions:

1. correct the error

 
IntMain (){IntX// * = 10 */;Return0 ;}

Obviously, // all the subsequent comments are missing;

If you do not know whether it is/or /**/

For more information, see "C traps and defects", the so-called "greedy" principle.

2. correct the error... probably.

# Include <stdio. h>DoubleSum (DoubleA,DoubleB,DoubleC ){Return(A + B + C );}IntFX (){If(1 ){Break; FX ();}}IntMain () {printf ("% F", Sum (10.2, 12.3, 16.1); FX ();Return0 ;}

Run and find break statement not within loop or switch

3. See this question again. Wei Sheng took the test last time, but this time it was simplified and the number was given in hexadecimal notation.

# Include <iostream>Using NamespaceSTD;IntMain (){IntX = 0x1e61, countx = 0;While(X) {countx ++; X = x & (x-1) ;}cout <countx;Return0 ;}

0x1e61 = 1 1110 0110 0001

The answer is 7.

4. Print the output

VoidFoo (Int* A) {A =New Int; * A = 20 ;}IntMain () {v = 10; Foo (& V); printf ("% D", V );Return0 ;}

Obviously, the print is still 10, and foo does not actually do anything for V, although it is the transmitted address

 

So much.

Short answer:

1. What are the advantages of iterator pattern and for-loop iteration methods?

One of the design modes: iteration Mode

2. In rdmbs what is transaction? What is transaction log? Why we need transaction log?

I don't know much about the relational database management system.

What I answer is the access process, access process records, and log

3. What is virtual function? How compliers implement the virtual function?

Leave it alone.

4. Write Program (psudo code) How to know a linked list has a circularum?

Many times

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.