Interpreted or Compiled????feel free to correct me cuz i think i need - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Interpreted or Compiled????feel free to correct me cuz i think i need

Destiny007Destiny007 Posts: 4Member
Im not sure but i know Pascal is a compiled language but am confused about if the following are correct, if anyone can correct me please do.....]

Java- Interpreted??
COBOL-Interpreted
C++- Compiled???

What would the computer display as the answer tothe following calculation:

6+8/2*4-5???
i got the following...4.2 but feel im wrong.

Also assuming the variables A,B,C and D hold the values shown would the following codes be executed or ignored?

1. if(A>10)and(B=6)then....?
2. if(C=10)or(B=6)then...?
3. if(A=10)and(B>=5)or(D=-5)then...?
4. if NOT(A=10)and(C<22)then...?

(im confuised with the above for real!)

* How cud i use Pascal to perform a conditional branch to make it repeat a block of code 8 times ?

* I dont know what Pascal variable data-type would be used to hold the following values:
1)3.123878?
2)10?

* Where could i go in terms of a website where i could find out about 'Von Neumann Architecture'based CPU and they can explain what the function of each section is?????


PLEASE ALL REPLIES WOUDL BE GRATEFUL!X

Comments

  • ManningManning Posts: 1,621Member
    Sounds like homework so I dont want to give direct answers. This should help though:

    : What would the computer display as the answer tothe following calculation:
    :
    : 6+8/2*4-5???
    : i got the following...4.2 but feel im wrong.

    I dont know about all compilers, but in Pascal it'll follow the order of operations (BEDMAS) so the answer will not be 4.2

    : Also assuming the variables A,B,C and D hold the values shown would the following codes be executed or ignored?
    :
    : 1. if(A>10)and(B=6)then....?
    : 2. if(C=10)or(B=6)then...?
    : 3. if(A=10)and(B>=5)or(D=-5)then...?
    : 4. if NOT(A=10)and(C<22)then...?
    :
    : (im confuised with the above for real!)

    This is easy to answer. Just put the code into a program and have it write something if the IF THEN evaluates to true. It's easy to see which ones are executed then.

    : * How cud i use Pascal to perform a conditional branch to make it repeat a block of code 8 times ?

    Lots of ways. The preferred would be to use the style that lets you specify the start and end values (where you would specify 1 for start and 8 for end)

    : * I dont know what Pascal variable data-type would be used to hold the following values:
    : 1)3.123878?
    : 2)10?

    Most people would say a floating point for 1) and a non-floating point for 2). Personally I would say floating point for both, since it's technically correct.

    : * Where could i go in terms of a website where i could find out about 'Von Neumann Architecture'based CPU and they can explain what the function of each section is?????

    www.google.com would be my first pick
Sign In or Register to comment.