How do you implement calculator in lex and yacc?
Create lex.l
create yacc.y
Compile using following:
cc lex.yy.c yy.tab.c -ll -lm
What are the differences of turbo c plus plus and mother program?
No idea what mother program is, but I assume you mean how does Turbo C++ compare to the ISO C++ standard. The last version of Turbo C++ came out in 2006 and was compliant with the standard at that time. However, Embarcadero (the current owners) no longer support Turbo C++, thus it no longer complies with the current ISO standard.
How can you create a virtual copy constructor?
You cannot. Constructors are specific to the class in which they are declared. They cannot be inherited and so they cannot be virtual.
How do I write a program that lets me convert text to Morse code on Turbo Pascal 7.0?
There may be a more efficient method (I know very little about Morse code) but since there are only 26 letters you could use a giant if-else if statement.
Write a program which takes the gender and salary ,the age from user. the program should calculate and display the following information.
i. If gender is male and age is greater >=18,then the tax =5%of the salary.
ii. If gender is female and age is >=18,then tax=3%of salary.
The program should display the output as follows:
Gender =
Age =
Tax =
Salary before tax =
Salary after tax =
Is the B programming language a high or low level programming language?
The B programming language is a high-levelprogramming language.
Write a program in c language that inputs 2 number and solve using euclidean algorithm?
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,max,min,r;
printf("Enter the values of a,b");
scanf("%d%d",&a,&b);
if(a>b)
{
max=a;
min=b;
}
else
{
max=b;
min=a;
}
while((max%min)!=0)
{
r=max%min;
if(r==0)
{
break;
}
max=min;
min=r;
}
printf("GCD=%d",min);
getch();
}
Difference between Apple Mac and Intel c compiler?
Apple provide the GCC (GNU Compiler Collection) compiler with their development tools which come free with the Mac OS X. Intel produce a version of their compiler for the Mac platform. For specific details see the links below.
What is the data type of a file?
Files don't have a data type. Functions, classes, enumerations and variables are all examples of data types. We may use a stream to represent a file, but a stream is no more a file than a file is a stream. A stream is merely an abstraction that can be used to represent any device that requires buffered input and/or output of character sequences.
Steps of algorithum for delete node in linklist?
To delete a node (this) in a linked list, first you need to find the address of the parent node (parent).
Problem in business that solved by computer assistance?
list 2 problems that might be arise at home,school,or in a business that could be solved more effieciently with computer assistance.identify the input,output and process.
What is the meaning of programmer in c language?
PROGRAMMER
The person who both designs/writes the program code is called: The programmer.
PROGRAMMING LANGUAGE
The program code itself is called: The programming language.
INTERPRETER/COMPILER
Most programming languages use 'high level' english based commands...but computers only know how to read 'low level' machine code numbers, instead.
This means that in order for such programming languages to work; then, there needs to be some form of intermediary translation program; which can translate from 'high level' english down to 'low level' machine code numbers.
Programming languages are either:
QBASIC, is an interpreted programming language.
C/C++, are both compiled programming languages
A CPU generally handles an interrupt by executing an interrupt service routine?
By checking the interrupt register at fixed time intervals
Why you need to declare auto storage class specifier in c language?
We don't. The auto storage class is the default storage class for all local variables and is therefore completely redundant in C. It exists for no other reason than that C evolved from B and inherited all its storage classes (auto, static, extern and register).
How is the field of computer programming always changing?
Because there are always new (and old!) problems to be solved and the current programming languages cannot possibly solve them all. They must adapt and evolve to meet the demands of new technologies, concepts and methodologies.
What is ellipsis operator in c?
It somehow tells the compiler that the function will accept an unknown number of parameters.
In SQL (the Structured Query Language), the language used to access databases, a UNION is the joining of several unrelated queries into a single result set. As a trivial example:
SELECT FirstName, LastName FROM Contacts UNION
SELECT FirstName, LastName FROM Leads
In this case, you are looking for all contacts' and leads' first names and last names.
How do you rectify linking error which says unable to open include file?
you just need to set path for the include and lib folder, which is ..\tc\include for ex c:\tc\include..
to do so choose directories in the options menu and write the path there.
What is the 2257 compliance statement?
US Code, Title 18, Part I requires that those producing visual depictions of sexually explicit conduct must maintain record of each performer including their name, age, maiden name, etc. In other words, the federal government requires that anyone producing pornographic material, must verify the names and ages of their performers and keep a record of that proof.
What is the difference between n-- and --n in C plus plus statement?
If these expressions are stand-alone (not nested), then they do the same thing, ie increment 'n'.
struct employee
{
};
struct supervisor : employee
{
// single inheritance -- a supervisor inherits all the public and protected properties of an employee.
};
struct manager : supervisor
{
// multilevel inheritance -- a manager inherits all the public and protected properties of a supervisor (and therefore an employee).
};