What is the procedure to perform string operations in Pascal?

1 Answer

Answer :

Pascal can’t handle the string of characters and it is one of the disadvantages of the language.  
- String of characters uses lots of data elements and characters and there need to be character  displacement using the string functions.
- The procedure is as follows:  
- Declaration of the string take place and it is declared as the string of fixed length array like:  var string: packed array [1..50] of char;  
- The length of all the strings should be same and the length of the handler routines as well.  
- The size of the array can be made according to the requirement but, there is no assigning of the  string constant to strings like:  
string = 'hello, world';  
- The length of the string should be 100-200 characters.

Related questions

Description : What are the features that make Pascal a good language in modern programming?

Last Answer : Pascal is a very structured language and uses the control structures like if-else, repeat-until statements, etc. - It is having different data structures that are included with the records, arrays, ... and operators to perform on them. It provides a way to process and use the efficient code.

Description : Write a program to initialize large number of strings?

Last Answer : Strings are used as a constant and it helps in creation of the procedure and for the initialization process. - Find the strings and assign it to the variable string. Then create a special string type that will help in ... for i := 1 to cstlen do s[i] := c[i] { place string } end;

Description : What is generalization? Give an example of generalization

Last Answer : A generalization is an object class, which is a superset of another object class (or classes). Generalization models the is a relationship set since members of the specialization class (or ... is used when two classes are similar, but have some differences. Look at the generalization below

Description : What is Software Development Life Cycle? (SDLC) and draw a diagram for pure waterfall life cycle.

Last Answer : System Development Life Cycle (SDLC) is the overall process of developing information systems through a multi-step process from investigation of initial requirements through analysis, design, implementation and maintenance.

Description : Mention some of the process models appropriate for the software to be engineered?

Last Answer :  Linear sequential or waterfall model  Prototyping model  Rad model  Incremental model  Spiral model  Winwin spiral model  Component based development model

Description : How spiral model works?

Last Answer :  The spiral model is an evolutionary software process model that couples the iterative nature of prototyping with the controlled and systematic aspects of the waterfall lifecycle model.  It also has an emphasis on the use of risk management techniques.

Description : What are case tools?

Last Answer :  Computer Aided Software Engineering - CASE tools assist software engineering managers and practitioners in evey activity associated with the software process.  They automate project management activities ... process and assist the engineers in their analysis, design, coding and test work.

Description : Write a program using concept of pointers to string for performing following operations: (i) String concatenation (ii) String comparisons

Last Answer : (i) Program to implement String Concatenation: #include #include void main() { char s1[50],s2[30],*p,*q; clrscr(); couts1>>s2; p=s1; q=s2; while(*p!=NULL) { p++; } while(*q!=NULL) { *p=*q; p++; q++; } *p='\0'; cout

Description : How would I perform this operation on a string in PHP?

Last Answer : That isn’t XML, that’s HTML. Can you not grab the data in a format where times are stamps?

Description : Write the SQL functions which will perform the following operations: (i) To display the name of the month of the current date . -Technology

Last Answer : (i) monthname(date(now()))(ii) trim(“ Panaroma “)(iii) dayname(date(dob))(iv) instr(name, fname)(v) mod(n1,n2)

Description : What is the protocol called that defines how a client can access information perform operations and share directory data on a directory sever?

Last Answer : LDAP (Lightweight Directory Access Protocol)

Description : What term in algebra means to perform all the indicated operations to an expression?

Last Answer : What is the answer ?

Description : What means to perform all the indicated operations to an expression in math?

Last Answer : What is the answer ?

Description : The proper definition of a modern digital computer is A) An electronic automated machine that can solve problems involving words and numbers B) A more sophistic and modified electronic pocket calculator C) Any machine that can perform mathematical operations D) A machine that works on binary code

Last Answer : Answer : A

Description : The secondary storage devices can only store data but they cannot perform A) Arithmetic Operation B) Logic operation C) Fetch operations D) Either of the above

Last Answer : Answer : D

Description : The first machine to successfully perform a long series of arithmetic and logical operations was: A) ENIAC B) Mark-I C) Analytic Engine D) UNIVAC-1

Last Answer : Answer : B

Description : The part of a processor which contains hardware necessary to perform all the operations required by a computer: a) Data path b) Controller c) Registers d) Cache

Last Answer : Answer: a Explanation: A processor is a part of the computer which does all the data manipulation and decision making. A processor comprises of: A data path which contains the hardware necessary to ... the data path what needs to be done. The registers act as intermediate storage for the data

Description : The first calculator that can perform all four arithmetic operations(Addition, Subtraction, Multiplication, Division) was known as______ (A) Pascaline (B) Slide Rule (C) Step Reckoner (D) None of the Above

Last Answer : (C) Step Reckoner

Description : What is the proper organizational role of internal auditing? a. To serve as an independent, objective assurance and consulting activity that adds value to operations. b. To assist the external auditor in ... . d. To serve as the investigative arm of the audit committee of the board of directors

Last Answer : To serve as an independent, objective assurance and consulting activity that adds value to operations.

Description : The secondary storage devices can only store data but they cannot perform a. Arithmetic Operation b. Logic operation c. Fetch operations d. Either of the above

Last Answer : Either of the above

Description : The first machine to successfully perform a long series of arithmetic and logical operations was; a. ENIAC b. Mark I c. Analytic engine d. UNIVAC-I

Last Answer : Mark

Description : The proper definition of a modern digital computer is a. An electronic automated machine that can solve problems involving words and numbers b. A more sophistic and modified electronic pocket calculator c. Any machine that can perform mathematical operations d. A machine that works on binary code

Last Answer : A machine that works on binary code

Description : The main function of the ALU is: a) Store Data and Information for Future Use b) Perform arithmetic and logical operations c) Control Computer Output, such as Printing d) None of These

Last Answer : b) Perform arithmetic and logical operations

Description : The main function of the ALU is to a) perform arithmetic and logical operations b) store data and information for future use c) control computer output, such as printing d) monitor all computer activities e) None of these

Last Answer : a) perform arithmetic and logical operations

Description : A set of rules for telling the computer what operations to perform is called a a) procedural language b) structures c) natural language d) programming language e) None of these

Last Answer : d) programming language

Description : Surgeons can perform delicate operations using devices through computers. This technology is known as?

Last Answer : Robotics

Description : What type of flowchart is constructed by the programmer to represent the sequence of operations the computer is to perform to solve a specific problem?

Last Answer : A programming flowchart.

Description : In a general-purpose computer, the ability to perform a wide variety of operations is achieved at the expense of what capabilities?

Last Answer : Speed and efficiency.

Description : . How is a general-purpose computer able to perform different operations?

Last Answer : By storing different programs in its internal storage

Description : What is the control unit's function in the CPU? a. To transfer data to primary storage b. to store program instruction c. to perform logic operations d. to decode program instruction

Last Answer : b. to store program instruction

Description : The first machine to successfully perform a long series of arithmetic and logical operations was: a. ENIAC b. Mark-I c. Analytic Engine d. UNIVAC-1

Last Answer : b. Mark-I

Description : The secondary storage devices can only store data but they cannot perform a. Arithmetic Operation b. Logic operation c. Fetch operations d. Either of the above

Last Answer : d. Either of the above

Description : The first machine to successfully perform a long series of arithmetic and logical operations was; a. ENIAC b. Mark I c. Analytic engine d. UNIVAC-I

Last Answer : b. Mark I

Description : The proper definition of a modern digital computer is a. An electronic automated machine that can solve problems involving words and numbers b. A more sophistic and modified electronic pocket calculator c. Any machine that can perform mathematical operations d. A machine that works on binary code

Last Answer : d. A machine that works on binary code

Description : IDIV and DIV instructions perform the same operations for? a) Unsigned number b) Signed number c) Signed number & Unsigned number d) none of above.

Last Answer : b) Signed number

Description : The first machine to successfully perform a long series of arithmetic and logical operations was: a. ENIAC b. Mark-I c. Analytic Engine d. UNIVAC-1

Last Answer : b. Mark-I

Description : The secondary storage devices can only store data but they cannot perform a. Arithmetic Operation b. Logic operation c. Fetch operations d. Either of the above

Last Answer : d. Either of the above

Description : State four arithmetic operations perform on pointer with example.

Last Answer : The pointer arithmetic is done as per the data type of the pointer. The basic operations on pointers are Increment: It is used to increment the pointer. Each time a pointer is incremented, it points to the ... address 1004, Then ptr-2 shows 1004-(2*2) = 1000 as decremented location for an int. 

Description : Write a program to accept two numbers from user and perform addition, subtraction, multiplication and division operations using pointer.

Last Answer : #include #include void main() { int no1,no2,*ptr1,*ptr2,result; clrscr(); printf("Enter no1:"); scanf("%d",&no1); printf("\nEnter no2:"); scanf("%d",&no2); ptr1=&no1; ptr2=&no2; ... "\n Multiplication=%d",result); result=*ptr1/(*ptr2); printf("\n Division=%d",result); getch(); }

Description : A byte addressable computer has a memory capacity of 2 m Kbytes and can perform 2 n operations. An instruction involving 3 operands and one operator needs a maximum of (A) 3m bits (B) m + n bits (C) 3m + n bits (D) 3m + n + 30 bits

Last Answer : (D) 3m + n + 30 bits

Description : Which of the following is the most efficient to perform arithmetic operations on the numbers? (A) Sign-magnitude (B) 1’s complement (C) 2’s complement (D) 9’s complement

Last Answer : (C) 2’s complement

Description : Arithmetic and Logic Unit I. Perform Arithmetic operations II. Store Data III. Perform comparisons IV. Communicate with input devices Which of the following is true ? (1) I only (2) III only (3) I and II (4) I and III

Last Answer : I and III

Description : What is syntax for dropping a procedure and a function .Are these operations possible?

Last Answer : Drop Procedure procedure_name Drop Function function_name

Description : A precision Approach Procedure is defined as: a. An approach using bearing, elevation and distance information b. An approach with a crew of at least 2 pilots trained for such operations c. An ... by an ILS or a PAR d. An approach using bearing, elevation, and, optionally, distance information

Last Answer : c. An instrument approach procedure utilizing azimuth and glide path information provided by an ILS or a PAR

Description : A procedure, or sequence of operations for determining whether a component or equipment is funcitoning or working normally.

Last Answer : Test

Description : A precision Approach Procedure is defined as: a. An approach using bearing, elevation and distance information b. An approach with a crew of at least 2 pilots trained for such ... An instrument approach procedure utilizing azimuth and glide path information provided by an ILS or a PAR

Last Answer : c. An instrument approach procedure utilizing azimuth and glide path information provided by an ILS or a PAR

Description : End of life care: is it reasonable to perform procedure after procedure on someone who is dying in the hopes of prolonging their life for days or weeks?

Last Answer : answer:This is a difficult question. My mother faced this situation w/ her own mother. She chose to extend my grandmother's life artificially, and it was not pleasant. My grandmother suffered terribly as did ... talk with my next of kin very soon to let them know my wishes about end of life care.

Description : When a CPA is approached to perform an audit for the first time, the CPA should make inquiries of the predecessor auditor. This is a necessary procedure because the predecessor may be able to provide ... 's work should be utilized. d. Whether the company follows the policy of rotating its auditors.

Last Answer : Whether the engagement should be accepted.

Description : 81. The scrub and circulating nurse should perform sponge count during which phases of an abdominal hysterectomy procedure? 1. Before the procedure 2. Before closing the endometrium 3. Before closing the peritoneum 4. At the skin closure 5. When the scrub nurse goes for a lunch break

Last Answer : A. All except 5

Description : The best learning procedure in teaching children is to have them Options: A) Read about the way an activity can be performed B) Write about the way an activity can be performed C) See an activity as it is being performed D) Perform the activity themselves

Last Answer : D) Perform the activity themselves