We briefly list some of C's characteristics that define the language and also have lead to its popularity as a programming language. Naturally we will be studying many of these aspects throughout the course. * Small size * Extensive use of function calls * Loose typing - unlike PASCAL * Structured language * Low level (BitWise) programming readily available * Pointer implementation - extensive use of pointers for memory, array, structures and functions. C has now become a widely used professional language for various reasons. * It has high-level constructs. * It can handle low-level activities. * It produces efficient programs. * It can be compiled on a variety of computers. Its main drawback is that it has poor error detection which can make it off putting to the beginner. However diligence in this matter can pay off handsomely since having learned the rules of C we can break them. Not many languages allow this. This if done properly and carefully leads to the power of C programming. The standard for C programs was originally the features set by Brian Kernighan. In order to make the language more internationally acceptable, an international standard was developed, ANSI C (American National Standards Institute).
What is an advantage of web based application compared to non web application?
here are the advantages: * Increasing awareness of the availability of a service, product, industry, person, or group. * The possibility of 24-hour access for users. * Standardizing the design of the interface. * Creating a system that can extend globally rather than remain local, thus reaching people in remote locations without worry of the time zone in which they are located.
What are the five steps in programming?
1. Keep your programs simple to understand. do not be afraid to use some complicated if statements in your program. Unless there is a easier way
2. Have your programming documented, up-to-date to the present version of the installed code. 3. In the code use the programming languge's opportunity to comment on your code. Say what a section is for, what it does and why it is done so. 4. Try to avoid hard-coded machine-specific names in your code, so that your program wil be able to run on someone else's machine as well. 5. Remember that other people may not own your fancy combination of hard- and software, so develop your software not on the latest OS or last month's CPU.
Hackers search computers and/or networks for weaknesses. Hackers that exploit these weaknesses are called Black Hats. The ones who try to fix this weaknesses are called White Hats. Grey Hats are both, usually they're White Hat Hackers by day, and Black Hats by night.
Q1 Find the minimum and the maximum number of keys that a heap of height h can contain?
Q1. Find the minimum and the maximum number of keys that a heap of height h can contain.
Advantages and disadvantages of procedural oriented language?
1) In Procedural language the programmers concentration is on problem and its solution so we need another approach where the developpers study the entire system and developped.
---- 2) after writing the programmers 10,000 to 1,00,000 lines of code in proce language they are loosing their control on the code.they cant identify the errors easily. latter if any modifications are there in the code it is difficult to modify.
---- 3) proce lang will not reflect the human beings life.but, o.o.prog'ing lang's reflects the human beings life.like inheritance,encapsulation,objects.......etc
By , James
Progarm to delete previous node in linked list?
struct LinkedListNode
{
void* data;
LinkedListNode* next;
};
LinkedListNode* head;
LinkedListNode* tmp;
while (head)
{
tmp head->next;
free(head);
head tmp;
}
What is sub classing in c plus plus?
Class in C++ is just the same meaning as in any other OO(object-oriented) languages. In the world of OO, anything are classes, which have properties, function to work. In other words, class is a method to organize things to work together.
How do you Assign an address to an element of pointer array?
Pointers were always difficult subject to understand. I would suggest to read several tutorials and spend some time playing with them.
Explanation:
/* create array of two pointers to integer */
int *aaa[2];
/* setting first pointer in array to point to 0x1212 location in memory */
aaa[0] = (int *)0x1212;
/* allocate memory for the second pointer and set value */
aaa[1] = malloc(sizeof(int));
*aaa[1] = 333;
/* if you want to can make first item to point to the second,
now arr[0] pointer address changed to the same as aaa[1] pointer */
aaa[0] = aaa[1];
/* print aaa[1] address and later print value */
printf("LOCATION: %X\n", (unsigned int)*(aaa + 1));
printf("VALUE: %d\n", **(aaa + 1));
/* exact the same here, but different way of how I wrote pointers */
printf("LOCATION: %X\n", (unsigned int)aaa[1]);
printf("VALUE: %d\n", *aaa[1]);
If you would do the same with 0 element of array, which points to 0x1212 memory location you would get some kind of number or Bus error if you accessed restricted memory place (for example the beginning of memory).
I hope this I did not make you more confused than you are.
Second-generation programming language is a generational way to categorize assembly languages. The term was coined to provide a distinction from higher level third-generation programming languages (3GL) such as COBOL and earlier machine code languages. Second-generation programming languages have the following properties:
* The code can be read and written by a programmer. To run on a computer it must be converted into a machine readable form, a process called assembly.
* The language is specific to a particular processor family and environment.
Second-generation languages are sometimes used in kernels and device drivers (though C is generally employed for this in modern kernels), but more often find use in extremely intensive processing such as games, video editing, graphic manipulation/rendering.
One method for creating such code is by allowing a compiler to generate a machine-optimized assembly language version of a particular function. This code is then hand-tuned, gaining both the brute-force insight of the machine optimizing algorithm and the intuitive abilities of the human optimizer.
Advantages and disadvantages of low level language?
Programs written in low level language are executed immediately. They require no compilers.
Low Level Language instructions can be used to manipulate the individual bits in a byte of computer storage.
DisadvantagesAre machine dependentdifficult to program.
Impossible for the programmer to memorize all the operational codes.
Correcting and modifying a program is difficult.
What is message passing explain the advantages of message passing?
message passing is the way of exchanging information between systems or individuals,at d same time.advantage is that we can interact by getting all the necessary details
What is round-robin scheduling?
The term round-robin often refers to something being done to many elements belonging to a group, one element at a time. It is the idea of the task being carried out "one element at a time" that is central here.
What is the Difference between multiple inheritance and multilevel inheritance in java?
Multilevel Inheritance
A Scenario where one class is inheriting/extending the bahavior of another class which in turn is inheriting behavior from yet another class.
Ex: public class Automobile {…}
Public class Car extends Automobile {…}
Public class Ferrari extends Car {…}
This multilevel inheritance actually has no limitations on the number of levels it can go. So as far as java goes, it is limitless. But for maintenance and ease of use sakes it is better to keep the inheritance levels to a single digit number.
Multiple Inheritance
Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces.
Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…}
And this is under the assumption that Car and Automobile are interfaces.
Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance.
An array name is a pointer constant?
An array's name is not a constant pointer; it's not even a pointer! An array name is a reference to the array itself. Unlike pointers, references have no memory of their own, therefore a reference cannot be constant (only what it refers to can be constant). A reference is nothing more than an alias for a memory address. Since there is no separate storage for references, you cannot reassign references while they remain in scope. So, in that sense, it behaves like a constant pointer. But a pointer is a variable, so even if declared const, it requires memory of its own in order to store the memory address it points to.
Example:
int a[10];
int * const p = a; // const pointer
assert( *p &a ); would cause an assertion. Likewise, assert( p != &p); proves that p must reside in a separate memory address from that referred to by a. It has to: pointers are variables even when they are declared const.
What are the Real time examples for non linear data structures?
In Systematically search option (Depth First Search), Data storing and retrieving in hard disk based on the "BALANCED TREE(AVL
- B- TREE)", printer (QUEUE),
In Programming language point of with out Data structure and Algorithms we can't develop a single program -
primitive data structures - INTEGER, FLOAT, CHAR , BOOLEAN, ETC..
abstract data structures- ARRAY , LINKED LIST , GRAPH, TREE, STACK , QUEUE. ETC..
So, In programming every where we are using without knowing about this...
try to learn basic thing about programming ....for to become a Good Software Engineer you should know the fundamental of Data Structure and Algorithms.
What are the most important hardware components needed for programming?
That really depends on several factors, one of which is the language you are going to use. There are literally hundreds of programming languages, for different purposes; each has different requirements.
For example, Java is a programming language that works on different platforms - that is, it works on a variety of types of hardware, and operating systems; the most basic thing you need is the (free) JDK (Java Development Kit), which includes the Java compiler and the Java Runtime; and any basic text editor such as NotePad.
What is a feature in c that is not in c plus?
C is a structured programming language which is feature of C which made it a powerful language when it was new in market.
But after C++ was developed structured programming was considered as disadvantage due to development of Object Oriented Programming Language.
What skills are needed to be a computer engineer?
In order to become a computer programmer you have to chose a specified programming language java ,c++ or web languages like php , asp others like css HTML and javasript are side languages. then you have to be good in logic too and lots of practice obviously that's it three four lines but lots of years and study.
What is the difference between object code and machine language?
The whole notion of "virtual" has become rather stretched in recent years, but the traditional distinction was that machinecode executes directly on the hardware, whilst bytecode is executed by a software emulator of a fully specified mythical machine. Bytecode is important to the UCSD Pascal p-system, to Forth, to SmallTalk, and more recently to Java. Of course, one could certainly build hardware which properly executes any of those bytecodes, and some folks have done just that.
What is the relationship between a program and an algorithm?
program is set of instructions or codes that system can only understand and compile where as algorithm is step by step process that system understands easily and user can also understand easily.
What are the disadvantages of fifth generation of language?
The major disadvantage of fifth generation programming languages is that these languages won't be as good as sixth generation languages.
It is also important to note that classification of programming languages in generations beyond the second generation is complete nonsense and nothing but a marketing hype; programming languages don't evolve in a linear succession, or one in the shape of a balanced tree, where each generation has common attributes and improvements over the previous generation.
What is a java constructor and write a program?
Constructors have the same name as the class itself and they do not specify a return type, not even void because they return the instance of the class itself.
Because constructors have the same name as the class then they allow method overloading and also save memory and execution time of program.
Program release memory of constructors function after using this function and it reduce program complexity.
Which programming language is the oldest basic c cobol fortran?
The Fortran and COBOL programming languages have both been around for a long time. Fortran was released around 1957, while COBOL followed a couple years later. Fortran has historically been mostly used for numerical and scientific calculations, while COBOL is primarily used by businesses.
Difference of c plus plus and fox pro?
C++ is a generic, general purpose, object-oriented, structured programming language used to produce native machine code programs. FoxPro is a procedural language and Database Management System (DBMS).