In which ways can arrays be manipulated?
The ways in which arrays can be manipulated would depend on the software the individual uses. The software could be API, Windows Powershell, and Agilent.
Why you use only int data type in bitfied int c?
The C language standard permits a bitfield to be defined as a singled or unsigned integer with the given size (in bits), and it permits that individual implementations define the container, thus define the maximum size of a single bitfield. Some implementations also supply additional, non-standard language extensions to control the size of the bitfield container, allowing, for example, a choice between a 16 and a 32 bit container. No single bitfield can exceed the container's size.
The reason why only integer scalars are supported with bitfields is that only those have a meaning for arbitrary-length implementations. An unsigned bitfield of N bits accepts values in the 0...2^N-1 range, for example. Other scalar types such as float, double, etc, have an implementation-specific implied size (for example, 32 bits for a single precision floating point type or 64 bits for a double-precision floating point type). Those types have no defined interpretation of an arbitrary size. They could, but they don't.
What do you call programming languages that require you to declare the type of each variable?
Statically typed languages.
What data type is unemployment rates?
Unemployment rates are typically expressed as a percentage of the total workforce. Thus the unemployment rate for any given locale is a real number (float, double or long double) in the closed range 0.0 through 100.0.
What is the difference between Ada cobol and c language?
It is something like the difference between ship, car and air-plane: they are hardly similar in any aspect.
What is the flowcharts of input three values and display largest number?
Input N1, N2, N3
Max = N1
If N2 > Max then Max = N2
If N3 > Max then Max = N3
Display Max
Would you select c plus plus or java in 11 class?
Its really a matter of opinion. I prefer C++ to Java but that doesn't mean C++ is always better than Java. C++ can be rather hard to learn if you are new to it but it is a very rewarding language. On the other hand, Java is very portable and is used in just about all Android phones (I don't know enough to say whether or not all of them use java.) Anyway, if it is system development or game development you are going for, C++ is a great choice, providing low level access to the computer and providing fast speed if the code is written well. Java is a good portable language that is compiled to computer code using the Java Virtual Machine which compiles it to computer readable code and then runs which makes it portable. In the case of Java, mobile phone apps, web apps and games (most well known being Minecraft) are available to you. It all depends on what you want, hopefully with the information I have give you you can make and informed decision.
Give atleast 5 real life examples of circular linked list?
Why do you think it is a question? It is a homework assignment.
Most programming languages can be used to write real time process control software. There are many that are specific to a manufacturer's range of process control modules and others that are generic real time languages. However, languages such as BASIC, Pascal, Python and dozens more have all been used successfully for real time processing. The nature of a process control demands that the language has good support of input and output but otherwise, most languages can handle most processing tasks with ease.
Perhaps the more important issue is the operating system. Windows, for example, is not designed for real time applications because of the large number of background and system tasks going on. In a system where response time is critical, it is a poor choice. Linux is regarded as a better choice as it is easier to configure background operation but it is still not an ideal real time operating system. LTLinux is better optimized for real time work and others include Lynx, VXworks, QSE and QNX.
90
In short you cannot, unless you provide a suitable alternative to the standard library yourself (in other words, reinvent the wheel). At the very least you will need to include the common runtime definitions (crtdefs.h) just to create a bare-bones program that does absolutely nothing, but you'll need to implement all the standard IO functions yourself. Even third-party replacements make extensive use of the standard library, so you're completely on your own here. The standard library exists so that you can draw upon a rich set of primitive but highly optimised, tried and tested functions which act as building blocks upon which you can create your own programs.
How do you write a program to add 5 number?
Writing a program to add 5 numbers follows the same design principles as any other program design:
In the first step, clarify the requirements. For example, you might want to raise the following questions:
Will the program always add exactly 5 numbers, or any number of numbers up to 5?
Will all N summands be known at the same time, or will the program be required to add one summand at the time, until all N summands are accumulated?
Will all N summands share the same data type, and if so, what is the shared data type?
How is the program expected to handle summands of different types and resolution?
How is the program expected to obtain its input (the number N, and the N summands), and how is the program expected to present its output (the sum)?
How is the program expected to respond to error conditions?
In the second step, design a solution and identify its limitations. For example, you might discover that the algorithm stops functioning once the sum reaches a certain value. You might want to specify the precision of the result, and limitations of the algorithm (for example, the fact that N must be five).
In the third step, you'd repeat steps 1 and 2 until you understand the requirements, and the person who plans to use your program is satisfied with its limitations.
In the fourth step, you'd draft an initial version of the program. This could be feature limited (for example, with limited error checking), but should demonstrate that the core algorithm works correctly. Since the program will need to interface with a human or other programs, this version should also demonstrate this interface, proving that the required inputs and outputs can be obtained and delivered as intended.
In the fifth step, you'd refine your program. This will typically include refined error checking and diagnostics, performance improvements, etc.
In the sixth step, the program is being tested, and errors are addressed. When necessary, this might require returning to step 1.
In the seventh step, you should always review the requirements and limitations again to ensure that these agreed facts remain true, and no further limitations were added or new requirements discovered.
Subject to the complexity of your program, other steps include the creation of documentation and training materials, legal research, patent filing, software installation and distribution, protection of your intellectual property, and some-such.
What data type automatically increases each time a new record is entered?
There is no data type that automatically increases each time a new record is entered. You are probably thinking of a linked list, but that is not a data type, it is a container and it must be manually programmed to ensure correct behaviour. However, C does not provide object-oriented encapsulation so correct behaviour cannot be guaranteed. In C++, all containers are implemented as encapsulated objects, thus correct behaviour can be assured and the container can shrink and grow automatically.
Which type of c program can be run on windows 7?
I guess you wanted to ask: why don't DOS-programs (like TurboC and programs generated by TurboC) run on Windows 7?
Answer: it is by design; unlike older versions, Windows 7 doesn't have a built-in DOS-emulator. Download and use DosBox.
How data structure can influence program performance?
Greatly.
Certainly, a person with data structures orientation will write better structure code.
Imagine yourself is asked to write adding to big integers numbers having 200 digits?
Using long also we can not do this.
By employing linked list type data structure we can achieve this.
This is an example only.
What is the difference between using a return value and a pass-by-reference parameter?
The main difference is that return values can be used in compound statements (such as assignments), whereas output parameters cannot. An output parameter is a non-const parameter that is passed by reference or as a pointer variable.
As a general rule, every function should return something through the return value, even if only an error level where zero would typically indicate success (but not always). A function that does not return anything (returns void) is not strictly a function, it is better described as a procedure. However, if a function can be guaranteed never to fail (provides trivial functionality) and has no need to return any other value to the caller, then returning void is a logical option. Just because a function should return a value doesn't mean that it must return a value.
However, the return value is limited by the fact that it only permits one value to be returned by a function. Output parameters allow a function to return several values at once and can be used in conjunction with the return value. If there is no need for the return value, it should be used to indicate the error level of the function wherever it would be appropriate. However it is not unusual for a function to accept a reference as an output parameter and to also return that same reference via the return value.
Note that although you could return multiple values via a struct or class type, this should only be considered if you have several functions that can make use of the struct or class type. However, in most cases it would be simpler to make those functions members of the struct or class itself.
What is the syntax to return a Pointer To A Character?
A function f() will can be defined as returning a pointer to a character with the syntax
char *f()
{
}
One must be careful in creating these functions that the character pointer is set to point to a static variable or an allocated string; an automatic variable will vanish when the function exits, leaving the pointer invalid.
I should point out that this is very basic C syntax. If this question is being asked as part of a school assignment, I must suggest that perhaps you should drop this course now, as it will be immeasurably harder as you get further into it.
How do you write an assembly language program to count the number of ones in a given byte?
1. Find algorithm.
2. Implement it.
Hint: if a non-zero N number has K 1-bits, then (N AND N-1) has K-1 1-bits.
What would happen if you put too few elements in an array when you initialize it?
If the array does not have an initial size parameter, the array would be the size of the initialization vector, so you would not be able to store any data beyond the end of those elements without crashing your program or causing memory bugs. If there is a specified array size and the initialization vector is smaller than that size, then all remaining elements will be set to the value 0; it is not an error to not specify all elements in the initialization vector.
How you can draw an ellipse in C language?
The C language does not provide any support for graphics as standard. C is designed to be as generic as possible, but graphics are a system-specific feature. To use graphics in C you need a third-party graphics library that supports your operating system and hardware, however generic libraries such as OpenGL are available. Nevertheless, it is not possible to draw curves, you can only approximate a curve using a series of short lines. The shorter the lines and the higher the resolution, the smoother the curve will appear.
Assuming you have access to an OpenGL library, you can draw an ellipse as follows:
void DrawEllipse(float cx, float cy, float rx, float ry, int num_segments)
{
const float pi = atan (1) * 4;
float theta = 2 * pi / float (num_segments);
float c = cosf (theta);
float s = sinf (theta);
float x = 1;
float y = 0;
float t;
glBegin (GL_LINE_LOOP);
for (int i = 0; i < num_segments; ++i)
{
glVertex2 f (x * rx + cx, y * ry + cy);
t = x;
x = c * x - s * y;
y = s * t + c * y;
}
glEnd();
}
Why compiler is not applicable in low level language?
In layman's terms, compiler is an application to convert the code into instructions computer can understand. In a low level language, the code is already written using low level instruction which a computer can understand. Hence there is no need for a compiler.
What is the basic difference between variables and data types in the c?
Variables are names given to the data. Data types are the kinds of data which the computer interacts with. In C there are five basic data types :
1)char (basically anything in ' '. Normally a single character)
2)int (all integers like -5 , 10 , -3201 etc)
3)float (any decimal value)
4)double (Higher decimal value)
5)void (nothing)
Consider the following statement
int var = 1;
The above statement means that you are declaring a variable var which is of data type int and giving the variable a value of 1.