Delphi software question ZZ

Source: Internet
Author: User

Delphi software question ZZ
Shury published on 14:27:00

1. How do you Code an infinite loop in C?
2. Volatile:
A) What does the keyword volatile mean? Give an example
B) can a parameter be both const and volatile? Give an example
C) can a pointer be volatile? Give an example
3. What are the values of A, B, and C after the following instructions:
Int A = 5, B = 7, C;
C = A ++ B;
4. What do the following declarations mean?
A) const int;
B) int const;
C) const int *;
D) int * const;
E) int const * a const;
5. Which of the following statements describe the use of the keyword
Static?
A) within the body of a function: a static variable maintains its value
Between Function revocations

B) within a module: a static variable is accessible by all functions
Within that module
C) within a module: a static function can only be called by other
Functions within that module
6. embedded systems always require the user to manipulate bits in
Registers or variables. Given an integer variable A, write two code fragments.
The first shoshould set bit 5 of A. The second shnshould clear bit 5 of A. In both
Cases, the remaining bits shoshould be unmodified.
7. What does the following function return?
Char Foo (void)
{
Unsigned int A = 6;
Iht B =-20;
Char C;
(A + B> 6 )? (C = 1): (C = 0 );
Return C;
}
8. What values are printed when the following C program is executed?
Int I = 8;
Void main (void)
(

 

9. What will be the output of the following C code?
Main ()
{
Int K, num = 30;
K = (Num> 5? (Num <= 10? 100:200): 500 );
Printf ("% d", k );
}
10. What will the following C code do?
Int * PTR;
PTR = (int *) ox67a9;
* PTR = oxaa55;
11. What will be the output of the follow C code?
# Define product (x) (x * X)
Main ()
{
Int I = 3, J, K;
J = product (I ++ );
K = product (++ I );
Printf ("% d", j, k );
}
12. Simplify the following Boolean expression
! (I = 12) | (j> 15 ))

13. How many flip-flop circuits are needed to divide by 16?
14. Provides 3 properties that make an OS, a RTOS?
15. What is pre-emption?
16. Assume the BC register value is 8538 h, and the De register
Value is 62a5h. Find the value of register BC after the following
Assembly operations:
MoV a, c
Sub E
MoV C,
MoV a, B
SBB d
MoV B,
17. In the assembly code shown below
Loop: mvi c, 78 h
DCR C
Jnz Loop
Hlt
How many times is the dcr c operation executed?
18. Describe the most efficient way (in term of execution time
And code size) to divide a number by 4 in assembly language
19. What value is stored in m in the following assembly language code
Fragment if n = 7?

Ldaa # N
Label1: cmpa #5
BHI L3
Beq L2
Deca
Bra L1
Label2: clra
Label3: staa # m
20. What is the state of a process if a resource is not
Available?
21. Using the # define statement, how wocould you
Declare a manifest constant that returns
Number of seconds in a year? Disregard leap
Years in your answer.
22. interrupts are an important part of embedded
Systems. Consequently, extends compiler vendors
Offer an extension to Standard C to support interrupts.
Typically, the keyword is _ interrupt. The following
Code uses _ interrupt to define an interrupt service
Routine (ISR). Point out problems in the code.

_ Interrupt double compute_area (double radius)

Double area = pI * radius;
Printf ("/narea = % F", area );
Return area;
}
 
 

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.