What is basic terminology for data structure?
Transversing
Accessing each record exactly once so that certain items in the record may be processed.(This accessing or processing is sometimes called 'visiting" the records.)
Searching
Finding the location of the record with a given key value, or finding the locations of all records, which satisfy one or more conditions.
Inserting
Adding new records to the structure.
Deleting
Removing a record from the structure.
Sometimes two or more data structure of operations may be used in a given situation; e.g., we may want to delete the record with a given key, which may mean we first need to search for the location of the record.
Give 10 example of close loop control system?
1. lightswitch --> light
2. Toaster --> toast (For timer-based toasters, only -- see below)
3. Water faucet --> water flow amount
4. Water faucets (hot/cold) --> water temperature in the sink or shower.
5. Temperature setting for the stovetop --> heat to cook food
6. TV remote control
7. Clothes dryer (timer based)
8. Volume on a stereo / home entertainment system
9. shades / blinds on a window --> 'regulating' the amount of light coming in from the outside.
10.
Closed loop:
1. Thermostat --> furnace (constant temperature)
2. Toaster setting (light/dark) --> toast (IF the toaster has heat sensors)
3. Refrigerator cold/hot setting --> refrigerator inside temperature (constant)
4. Temperatue setting for oven (not stovetop) --> oven temperature constant
5. Clothes dryer with moisture sensor
6. Washing machine water level
Which of these computer languages was designed to teach mathematical concepts?
AMPL: A Modeling Language for Mathematical Programming (Hardcover)
A Mathematical Programming Language
What are Static variables in c?
A static variable in C is a variable whose value and memory allocation persists throughout the execution of the program. If the variable is declared at file scope (outside of any blocks) the static attribute means the variable is visible only to the file containing it, i.e. it can not be referenced through an extern reference in a different file.
What are the attributes of good programming languages?
There are many attributes that make up a good programming language. Here are some of the most important ones:
Readability: A good programming language should be easy to read and understand. This makes it easier for developers to write and maintain code, and reduces the likelihood of errors.
Maintainability: A good programming language should be easy to maintain and update. This includes having clear and concise syntax, as well as tools for debugging and testing.
Performance: A good programming language should be efficient and fast. This includes having a low memory footprint, minimal overhead, and fast execution times.
Portability: A good programming language should be portable, meaning it can run on different platforms and operating systems without significant changes.
Flexibility: A good programming language should be flexible enough to accommodate different programming styles and paradigms, as well as be extensible with libraries and frameworks.
Safety: A good programming language should prioritize safety and prevent common programming errors, such as null pointer dereferences or buffer overflows.
Community: A good programming language should have a supportive and active community of developers who contribute to its development, documentation, and maintenance.
Tooling: A good programming language should have a robust ecosystem of tools, such as editors, IDEs, and build systems, that make development and deployment easier and more efficient.
Scalability: A good programming language should be able to scale with the needs of the project, whether it be a small script or a large-scale enterprise application.
Future-proofing: A good programming language should be designed with a long-term vision, taking into account future developments in hardware, software, and technology trends.
Why do you need signed and unsigned integer?
We need signed integers in order to represent both negative and positive values. However, some numbers can never be negative. For instance, the size of a file must always be greater than or equal to zero so we use unsigned integers to represent file sizes. Also, natural numbers must be greater than 0 so there's no point in using a signed value to represent a natural number. Signed integers also use one bit to denote the sign, but unsigned integers do not thus unsigned integers can effectively represent twice the range of positive values than an unsigned integer can. For instance, an 8-bit signed value can represent values in the range -128 to +127 using twos complement notation, but an 8-bit signed value can represent values in the range 0 to 255.
Write a C program to print numbers from 1 to 999 in words?
write a c program which reads an integer value from the keyboard then it displays the number in words?
#include<stdio.h>
#include<conio.h>
void main(void)
{
int rev,n,
clrscr();
printf("\n enter any number");
scanf("%d",&n);
temp=n;
while(n>0)
{
rem=temp%10;
rev+=rem*10;
temp=temp/10;
choice=rev%10;
switch(choice)
{
case 1:
printf("one");
break;
case 2:
printf("two");
break;
case 3:
printf("three");
break;
case 4:
printf("four");
break;
case 5:
print("five");
break;
case 6:
printf("six");
break;
case 7:
printf("seven");
break:
case 8:
printf("eight");
break:
case 9:
printf("nine");
}
getch();
}
What are the unique advantages of object oriented programming paradigm?
a. OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined interface.
b. OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
c. OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.
What is Objectives Oriented Evaluation Approach to program evaluation?
Objectives Oriented Evaluation Approach is the means by which the worth or merit of a program is assessed based on the extent to which the objectives or purposes of the program are being achieved.
Keywords in a programming language that allow the programmer to redirect the flow of the program based on a decision are called
Assume the question was for C#, not C.
":" is syntax to extend a type. If the type extended from is another class, they form a class hierarchy and the "inheritance" is established:
For example:
class Base {}
class Derived : Base {}
Derived extends Base, and thus inherits from Base.
What is the definition of a base-class constructor?
A base class constructor is simply a constructor that is declared within a base class. There is nothing particularly special about them since all constructors are only of relevence and applicable to the classes in which they are declared.
What are the three most common data types used in c?
Pick any three:
int, char, long, void, char *, void *
How can you erase a password that you can not remember?
The best thing to do, if you are good at computers and are able to do this, would be to perform a password recovery. If you are not very good at computers, you would need to take your computer to a computer maintenance and repair shop, or local tech support facility, and have them perform the password recovery. Usually, if you are the one that made the password, you also input a clue as to what your password may be, which is made accessible by clicking the "?" if you are using the Welcome Screen on Windows XP.
What is complete binary tree in c?
The basic idea (you write functions CountChildren, GetChild, NewBinTree):
struct GenTree;
struct BinTree;
typedef struct GenTree GenTree;
typedef struct BinTree BinTree;
int CountChildren (const GenTree *from);
int GetChild (const GenTree *from, int which);
BinTree *NewBinTree (DATATYPE data, BinTree *left, BinTree *right);
BinTree *Convert (const GenTree *from)
{
BinTree *bt, *tmp;
int i, n;
if (from==NULL) return NULL;
n = CountChildren (from);
bt = NewBinTree (from->data, NULL, NULL);
if (n 1) return bt;
tmp = Convert (GetChild (from, n));
for (i=n-1; i<=2; --i) {
tmp= NewBinTree (<NODATA>, Convert (GetChild (from, i)), tmp);
}
bt->right = tmp;
return bt;
}
Why object oriented analysis and design useful?
:-- Object-oriented development is not a new technology but it has not had widespread use and is still maturing. Object-oriented analysis starts you on a path that can lead to benefits not only in the analysis process but in subsequent development phases. Proponents of the object-oriented approach list the benefits as an easier way to promote the understanding of a system, reusability of models and programming, modifiability and reduced costs associated with change, and reduced development risk. These benefits lead to a superior method of analyzing business processes and requirements. Finally, because the contemporary view of development is from the object-oriented perspective, object-oriented analysis allows you to take advantage of the contemporary programming languages, operating systems and associated tools. [1 p.215, 16 p.493, 12, 2 p.11]
Objects are said to replicate what humans see in real life and, therefore, appeals to human cognition. The object-oriented paradigm views the world as composed of objects with well-defined properties, with objects replicating things in an environment. [19] It is easier to promote a user's understanding when the user is presented with objects describing things found in the normal course of conducting business. For example, it is much easier for accountants to view a system when entities such as customers, checks, invoices and receipts are used. The user can, therefore, better visualize the concepts of the system and assist the analyst in describing the system by focusing on what is to be accomplished rather than focusing on procedures. [12, 16 p.493]
Reusability is a desired goal of all development and is based on the reluctance of reinventing something when it has already been invented. Object-oriented development supports this, especially in the concept of abstraction. [3] Abstraction supports continual iterations of analysis until unique objects are found in a class hierarchy. These unique objects inherit characteristics from the higher level classes and this allows you to reuse information from the previously defined classes, eliminating the need to reinvent it. Class structure leads to the development of class libraries that allow the sharing of models and programming throughout a system. The development process can be simplified, from analysis to requirements to implementation, through the use of the building blocks of classes and objects. [12, 18, 3]
The use of objects makes it easier to change and modify systems. For example, the year 2000 (Y2K) problem may have been eliminated by identifying a date object within a system and accessing this object when you needed to date an operation. If the date object had the state variables of month, day and year with each defined as two-character variables, the only change that would be necessary to correct the Y2K problem was to change the year state variable of only the date object. No need to examine multiply lines of code or to use significant resources to locate all the processes using a date functionality and the appearance of it in a procedural program. Modification of systems can also be accomplished through adding methods or state variables to objects. Because encapsulation isolates unnecessary methods and messages from other objects, you can add this type of information to an object to allow it to interact with another object. Theoretically, you are changing the system without having an effect on the existing object interactions. [12, 3]
The risks associated with the development process are reduced by providing a methodology that promotes understanding of a system, making information easy to use and reuse throughout a system, and developing a system that is easier to modify and change making the maintenance process easier. It helps to reduce the complexity of the analysis and development process.
Describe the four basic data types in c?
Describe the basic data types in C
Describe the basic data types in C
Does each programming language have its own specific IDE?
No. Some languages are interpreted, not compiled.
No. Some languages are interpreted, not compiled.
No. Some languages are interpreted, not compiled.
No. Some languages are interpreted, not compiled.
What is one disadvantage of the internet?
Some of the negative impacts of internet of society are the quick spread of vices, because most of the ills in society tend to go viral on the internet. People quickly take up the wrong role models because of the glorification of societal vices.
How does an interpreter translate high-level code to machine code?
A computer does not execute a program in a high level language. A computer executes a program in machine language. The high level language is converted into machine language by a compiler. Alternatively, an interpreter executes on the computer in machine language and the interpreter executes the high level language.
What kinds of programming languages may be developed and used in the future?
It is always very hard to predict the future, especially in an area which has seen very rapid development over the past two decades.
In software engineering of applications interfacing with human users, powerful new declarative approaches are the modern choice, such as Microsoft's Windows Presentation Framework (WPF) and its XAML language, or Adobe's Flex (with MXML), and others.
It is probably fair to assume that the declarative part of application design will grow in the near and mid-term future, taking even more responsibility for the mundane tasks related to graphical user interface development off the programmer. This allows to focus more implementing the application's core algorithm and logic.
It's probably also fair to assume that the dividing line between desktop applications, web applications and mobile applications continue to diminish both in term of design as well as in terms of usability: applications will increasingly work within a web browser, and it will be common to have a (possibly feature reduced) mobile app on a smart phone or tablet computer, or a desktop app all resulting from the same development effort.
It is fair to assume that programming languages will continue supporting this goal in even more comprehensive hardware abstractions and increased automation of the housekeeping work.
What is used to translate source code instructions into appropriate machine language instructions?
Languages are either "Compiled languages" or "interpreted languages":
- A compiled language will use a compiler which is another program that checks your code and then converts it to the correct machine code for the machine it is intended to run on. You can only run the program after you have compiled it. A compiler can help spot syntax errors and certain semantic errors and will give you a "compilation error".
- An Interpreted language can be ran directly as long as you have another program called the interpreter which translates your code into machine code whilst it is running. This means certain errors will not be caught before runtime (There is no concept of a compilation error) and so you won't know until runtime if certain errors are present in your code
Describe three advantages of Java programming language?
Java has many more than 3 characteristics, which can be labelled "advantages"; of course, most of the following are shared by several other languages.