Delphi and Pascal Programming

Pascal was first released in 1970, it is an influential imperative and procedural programming language. It was created by Niklaus Wirth. The language is influenced by the ALGOL programming language.

162 Questions
Delphi and Pascal Programming

Write a program to arrange a list of numbers in ascending order?

#include

int main()
{
int num[100];
printf("please input your numbers.enter any letter for the end\n");
int i=0,j=0,k=0;
while(scanf("%d",&num[i++]));
i--;
printf("you input %d numbers\n",i);
for(j=i-1;j>=0;j--){
for(k=0;k<=j;k++){
if(num[k]>num[k+1]){
int temp;
temp=num[k+1];
num[k+1]=num[k];
num[k]=temp;
}
}
}
for(j=0;j<=i-1;j++){
if(j%5)
printf("%d ",num[j]);
else{
printf("\n");
printf("%d ",num[j]);
}
}
return 0;
}

91011
Visual Basic Programming
C Programming
Delphi and Pascal Programming

Write a program to find whether a number is even or odd?

Number = Val(Textbox1.text)

If Number Mod 2 = 0 then

MsgBox("It is even.")

End If

If Number Mod 2 <> 0 then

MsgBox("It is odd.")

End If

91011
Java Programming
Delphi and Pascal Programming

Difference between java and pascal?

java is more user friendly and needs an interpreter to translate from source code to executable

91011
Java Programming
Definitions
Delphi and Pascal Programming

What do you mean by procedure?

A procedure is a specified series of actions or operations which have to be executed in the same manner in order to always obtain the same result under the same circumstances (for example, emergency procedures). Less precisely speaking, this word can indicate a sequence of activities, tasks, steps, decisions, calculations and processes, that when undertaken in the sequence laid down produces the described result, product or outcome. A procedure usually induces a change. It is in the scientific method. So it is in Particular!

91011
Delphi and Pascal Programming

How do you download pascal program?

You can download demo's or free versions of Pascal from several places:

FreePascal: http://freepascal.org

Embarcadero Delphi: http://embarcadero.com/products/delphi

RemObjects Oxygene (Pascal for .NET): http://www.remobjects.com/oxygene/

Embarcadero Prism (Same as Oxygene): http://embarcadero.com/products/embarcadero-prism-xe2

789
Computer Science
Delphi and Pascal Programming

What are the differences between the stack data structure and queue data structure?

A stack is a place to put things for later retrieval, in the reverse order that it was saved. Think of it as a stack of papers. If you get interrupted to do something else, you put the papers you are working on on top of the stack, and work on the new papers. When you are done, you take the old papers off of the top of the stack. If you get interrupted multiple times, you stack up multiple things, and you get back to them in the order that you were last working on them.

A queue is a place to put things for later retrieval, in the same order that it was saved. Think of it as a line of people waiting to buy a theater ticket. The first person there gets to buy the first ticket, and so on and so forth. A queue allows you to submit things to be done, such as requests to run a job, and they will be processed in the order they were received.

789
Computer Programming
Java Programming
C Programming
Delphi and Pascal Programming

Why do we have to use uses crt or clrscr in pascal programming language?

No, you don't have to.

789
Computer Programming
C Programming
Delphi and Pascal Programming

When was pascal programming language invented?

quote: Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.

789
C Programming
Computer Programming
Delphi and Pascal Programming

Write a program to find average of 3 numbers?

#incude<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int a,b,c,d,avg;

cout<<"enter s numbers";

cin>>a>>b>>c>>d;

d=a+b;

avg=d\3;

cout<<"the average is"<<s;

getch();

}

789
Database Programming
Computer Terminology
Delphi and Pascal Programming

What do you mean by Direct file organization?

A relatively small project that is similar to past effort might be best accomplished using the?

789
Java Programming
Delphi and Pascal Programming

Write a program to print pascal's triangle without using array?

1

2 3

4 5 6

123
Computer Programming
Delphi and Pascal Programming

When was the pascal programming language first publish?

1970 by Niklaus Wirth

Object Pascal came out in 1985.

567
C Programming
C++ Programming
Delphi and Pascal Programming

How does one write an algorithm that rounds off a decimal point to the nearest integer?

double round (double x) return (int) x + 0.5;

567
Computer Programming
Computer Science
Delphi and Pascal Programming

How do you make a memory card game on turbo pascal?

you cant u stupid

567
Computer History
Delphi and Pascal Programming

Why is pascal unsuitable for systems programming?

What gives you that idea? The entire OS of the UCSD-pSystem & the original version of MAC OS, on the 68000, were written in Pascal. Both worked quite well.

123
Database Programming
Microsoft Access
Delphi and Pascal Programming

Why are databases chosen over files?

for progam

345
Delphi and Pascal Programming

What is the basic construct for a Pascal program?

basiclly it starts with a very easy question followed by 4 or 5 easy ones too and then the work starts. the questions get harder as you go. it is made up of 3 sections a, b, and c. "a" is the easiest and that is what you should start with to get going and "b" is a little harder and he most of the hard questions are isit is the most critical part of the exam. the last part is"c" and it is very hard especially if you didn't take the material in it. it is all multiple choice so that's a heads up for you, it means you can go back to basics and think like a child again but the ANSWER HAS TO BE CORRECT, every question gives points if you get it right for example you get 5 points if you answer a question in part "a" correctly and 6 points for part "b" but if its wrong you get nothing at all, if you answer nothing in the question you get 2 points for leaving it. don't get too exited, you only get to leave 10 empty questions. without a doubt don't leave all the 10 empty try to solve them the test will be easy, and my advice to you is to leave all part "c" which is mad up of 5 questions only and that will give you a chance to miss a couple of questions on part "b" because some of it get a little hard. do not leave any questions in part "a" cause if you were chosen to do this exam it means you have some brains so solve it all.

345
Java Programming
C Programming
Delphi and Pascal Programming

Can two arrays exist in one pseudocode?

Or even three. Actually, pseudo-code has no rules.

345
Delphi and Pascal Programming

What is declaration in pascal programming?

Declaration is where you indicate what variables are used in the unit or function/procedure.

For example, in some languages you can make up variables as you go, like the following C# example:

static void Main(string[] args)

{

string firstName = "John";

string lastName = "Doe";

}

Pascal and Delphii are strongly typed languages.

You would create the same example in pascal as

Procedure Main;

var

FirstName: string;

LastName: string;

begin

FirstName := 'John';

LastName := 'Doe';

end;

345
Computer Programming
Delphi and Pascal Programming

What is turbo pascal programming language?

Turbo Pascal was released by Borland as an all-in-one solution to design computer programs (DOS) using the Pascal language.

Since then, Turbo Pascal morphed to Delphi 1 to create Windows application. Delphi is now owned and managed by Embarcadero and are soon releasing their Delphi XE3 edition.

345
Delphi and Pascal Programming

How do you use the pascal programming?

Use a compiler, such as FreePascal, Delphi or Oxygene and create your code using the Pascal syntax.

345
Java Programming
C Programming
Delphi and Pascal Programming

Why c and java arrays are start with zero and pascal arrays are start with one?

It's a difference in mentality; some believe 0 is the begin, and is thus the only logical choice, and some think the opposite.

345
Visual Basic Programming
QBasic
Delphi and Pascal Programming

What are the basic components of a program?

The main 2 components of any program in general are...

1> Program code (any programming language)

2> Data (numbers/text/graphics)

The programming language uses code to manipulate:

store/calculate/interrogate/display the data.

The data could, in fact, be located anywhere...

-inside of the program's own 'internal' structure such as:

data statements/array structure/variables list/-etc.

-or else, inside of an 'external' database file:

(.txt)/(.dat)/(.csv)/-etc.

345
Delphi and Pascal Programming

Why was turbo pascal programming named after the french mathematician blaise pascal?

Pascal programming was invented by Niklaus E. Wirth, a Swiss computer scientist in 1968. It was named in honour of Blaise Pascal (1623-1662) because he invented the first automatic adding machine.

345
Java Programming
C Programming
Delphi and Pascal Programming

What are advantages and disadvantages of compiler?

Using run-time languages or frameworks such as .NET, allow the compiled applications to be smaller in size as the common workings are in the framework. If there becomes updates to the framework, it could potentially cause problems with the application.

Using fully compiled applications, such as from Delphi, allow the apps to not have to depend on a framework and contain all they will need.

345

Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.