What are the advantages and disadvantages of high level language?
Advantages
- more human-understandable, logical and easy-to-learn syntax that enables programmer to code more effectively
- portability - some of them can be hardware and OS indipendent, for example Java
Disadvantages
- they are usually slower than lower-lever languages, for example assembler is faster than C which is faster than C++ which is faster than c# or Java (on the same computer, of course)
What is an example of square array?
*SQUARE
definition- A 4-sided regular polygon with all sides equal and all internal angles 90°example- A computer screen
*SQUARE (SQUARE ROOT)
definition- A divisor of a quantity that when squared gives the quantity
example- The square roots of 25 are 5 and −5 because 5 × 5 = 25 and (−5) × (−5) = 25.
How can airplanes hover with no forward speed?
An aircraft has what is called a stall speed. this speed is the point at witch the wings stop creating the necessary lift needed to keep it aloft. depending on many factors different aircrafts have different stall speeds. some as slow as 38 knots. so essentially this small aircraft will need to be pointed in the direction of the wind witch must be a sustained wind of at least 38 knots. In theory it is possible but highly unlikely. There are dubious claims that this type of aircraft can actually fly backwards. Its all a factor of the relative wind velocity across the wing.
Improved AnswerAircrafts are able to hover with no forward speed.The Harrier and the F-35Bs can both do it.
Basically, how they work is similar to helicopters
Instead of forward thrust for lift (like other aircrafts),
The thrust points downward to push the body up.
Both aircrafts' body and flaps are designed to either cruise or takeoff/land vertically
These two are the only two on top of my head, not sure if there are others like them
Oh, and one more thing: these aircrafts are called VSTOL aircrafts (stands for Vertical Short Take Off and Landing)
Hope that helps!
What high level computer language was named after a French mathematician and philosopher?
The programming language Ada was named for Ada Lovelace (a.k.a. Augusta Ada Byron a.k.a. Lady Lovelace), (b-1815, d-1852) a mathematician sometimes considered to be the first programmer.
Lovelace gained fame for writing a description of what is now considered one of the first computers: a mechanical device developed by Charles Babbage in the mid 1800's.
Explanation of top down marketing?
Top down marketing is a branding strategy where country strategies are based upon global branding strategies.
What are some advantages of the internet?
Some advantages of the internet are being able to job search for one. Also being able to research for school, or even looking up a recipe. Keeping in touch with E mail and Shopping online, or even online dating!
Is it safe to use open source software with Microsoft Windows?
They are 2 different things, not compatible in nature.
However, you can have a project to have iOS, Windows, Linux, etc all running under your new open source operating system, then the answer may be yes.
Windows, from the other hand, never have open source in mind, so itself is definitely not going to have features compatible to open source. (if there is any, it is accidental, and Microsoft may take that away in the future)
Write a program for addition of to array in c program?
#include
#include
void main()
{ int a[10][10],b[10][10],c[10][10],i,j.r,c;
printf("\nNo. of Rows?");
scanf("%d",&r);
printf("\nNo. of Cols?");
scanf("%d",&c);
printf("\nEnter elements for 1st array:");
for(i=0;i
printf("\nEnter elements for 2nd array:");
for(i=0;i
for(i=0;i
printf("\nDisplaying the result:\n");
for(i=0;i
}
getch();
}
If the ans helps you,plz increase the trust point.
How can you allocate memory dynamically in c?
char* new_string; // could be any type
new_string = (char*) malloc (5120); // allocate memory - typecast is necessary
if (new_string == NULL) ... memory exception ...
... use the data ...
free (new_string); // release memory when done
What are the Examples of mnemonics used in assembly language?
mnemonics are nothing but the symbols used to indicate a particular meaning in assembly language.
They are used to make programming easier for programmers.
For example BAL is a mnemonic for "branch-and-link."
All websites use HTML, but some sites use HTML in conjunction with one or more other coding languages like Javascript or CSS. HTML-only means it uses just the basic coding.
What does a modem and how is it related to binary or ASCII code?
A modem, short for modulator/ demodulator, "packages" data that is being transmitted so it fits whichever transfer protocol it's working with. That includes chopping up the data to the proper packet sizes, adding error-checking bits and addressing info, etc. It also does the opposite with received data, "unpacking" it so your computer can work with it.
What is the difference between algorithm and flowcharts?
They both are same. Both of them mean a set of instructions. but, an algorithm is a simple flow of instructions whereas in a flowchart the instructions are represented pictorially, and as the name suggest it is a 'flow chart'.
Write a c program using dynamic memory allocation to transpose a matrix?
Type your answervoid main()
{
int **a,**b,**c;
//int c[3][3];
int a_r,a_c,b_r,b_c;
int i,j,k;
clrscr();
again:
printf("\nenter rows and columns for matrix one:");
scanf("d",&a_r,&a_c);
printf("\nenter rows and columns for matrix two:");
scanf("d",&b_r,&b_c);
if(a_c!=b_r )
{
printf("\ncan not multiply");
goto again;
}
/* allocate memory for matrix one */
a=(int **) malloc(sizeof(int *),a_r);
for( i=0;i {
a[i]=(int *) malloc(sizeof(int*)*a_c);
}
/* allocate memory for matrix two */
b=(int **) malloc(sizeof(int)*b_r);
for( i=0;i {
b[i]=(int *) malloc(sizeof(int*)*b_c);
}
/* allocate memory for sum matrix */
c=(int **) malloc(sizeof(int *)*a_r);
for( i=0;i {
c[i]=(int *) malloc(sizeof(int)*b_c);
}
printf("\n enter matrix one %d by %d\n",a_r,a_c);
for(i=0;i {
for(j=0;j {
scanf("%d",&a[i][j]);
}
}
printf("\n enter matrix two %d by %d\n",b_r,b_c);
for(i=0;i {
for(j=0;j {
scanf("%d",&b[i][j]);
}
}
/*initialize product matrix */
for(i=0;i {
for(j=0;j {
c[i][j]=0;
}
}
/* multiply matrix one and matrix two */
for(i=0;i {
for(j=0;j {
for(k=0;k {
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
}
/* display result */
printf("\n Product of matrix one and two is\n");
for(i=0;i {
for(j=0;j {
printf("%d\t",c[i][j]);
}
printf("\n");
}
/*free memory*/
for(i=0;i {
free(a[i]);
}
free(a);
for(i=0;i {
free(b[i]);
}
free(b);
for(i=0;i {
free(c[i]);
}
free(c);
printf("\npress any key");
getch();
}
I would suggest you go to
http://code.freefeast.info/matrix-multiplication-using-pointers-in-c-dynamic-matrix-multiplication-in-c/
It has got a well formatted and commented code for this problemWhich island is also the name of a popular programming language?
Java (an Indonesian island). However, the Java programming language was named after the Indonesian coffee bean (a favourite of one of its developers) rather than the island itself.
What are the three main search expressions recognized by Boolean logic?
AND OR NOT
In a google search, the AND is implied, the OR is explicit, like (iceberg OR glacier),
and the NOT is expressed with a '-' before the relevant term.
High-level programming language intepreted?
EZtrieve and EZtrieve Plus are examples of a high level language that can be either compiled or run interpretive.
What is an auto ethnographic text?
Autoethnography is a reflexive perspective on the self as researcher. A text is written in the research process, on the researcher's experience, which can be called an autoethnographic text. This is sometimes referred to as reflexive ethnography.
#include<conio.h>
#include<stdio.h>
void main(void)
{
int sell_pr, profit, cost_pr, cost_pr_one_item ;
clrscr();
printf("Please enter the selling price of 15 items:");
scanf("%d", &sell_pr);
printf("Please enter the profit earned on 15 items:");
scanf("%d", &profit);
cost_pr = sell_pr - profit;
cost_pr_one_item = cost_pr/15;
printf("Cost price of one item is %d", cost_pr_one_item);
getch();
}
What are the key relationships between data warehouse and data mining?
Data warehouse is the database on which we apply data mining.
How are pointer different from other variables?
A pointer variable is a variable that contains the memory location of another variable or an array (or anything else in memory). Effectively, it points to another memory location.
For standard variables, you define a type, assign a value to that variable or read the value from it, and you can also read the memory location (&n = memory location of n) of the variable.
For pointers, you can point them to any variable, even another pointer, and you can get the value of the variable it points to (*p), the location of that variable in memory (p), or the address in memory of the pointer itself (&p).
Consider:
long n = 65;
long *p;
p = &n;
Results:
Type | Name | Location | Value
long n 0xA3FF 65
long * p 0x31DF 0xA3FF
So p points to n. Now,
n = 65
&n = 0xA3FF
p = 0xA3FF
*p = 65
&p = 0x31DF
You may find yourself having to use typecasts frequently when using pointers.
Pointers are useful when passing data to functions.
For instance, consider the following function:
void add(int a, int b, int c) { c = a + b; }
The problem here is that the computer copies each variable into a new memory location before passing them to the function as local variables. This function effectively does nothing. However, if you change the function to:
void add(int a, int b, int *c) { c = a + b; }
and call the function by passing in the location of the variable to the function:
add(a,b,&c);
then you can modify the variable itself.
Pointers are also good for working with arrays:
char *c = "Hello World";
int i=0;
while (c[i] != 0x00) { cout << c[i]; c++ } //print one letter at a time.
The for loop is used when you want to do a procedure, a certain amount of times.
The for loop is used when you already know how many times the loop will be repeated.
for example... you want to scan an array.
you can do something like this.
for(i=0;i<myArray.length;i++){
if(myArray[i] == 5){
alert("This array position contains the number five.");
}
}
the code above is javascript.
But the idea is the same in any language.
This is one use, but as I said. You use it when you already know the amount of times the loop will be repeated.
Algorithm of conversion decimal to hexadecimal?
The hexadecimal notation is base-16, so for small numbers, arrange them right to left as powers of 16 (units 0 to 9 and A through F representing 10, 11, 12, 13, 14, and 15).
Examples: 21 = 15 hex (16+5) and 31 = 1F (16+15)
For larger numbers, see the process at the related link below.
Here is a program:
#include
#include
void main()
{
int n;
clrscr();
printf("Enter Decimal Number: ");
scanf("%d",&n);
printf("Hexadecimal value is: %x",n);
getch();
}
How do you say daddy in binary code?
It depends on the encoding but if we assume standard ASCII encodings, the representation is the same for all systems, the only difference being the number of leading 0 bits per character.
7-bit ASCII (ISO/IEC 646):
1100100 1100001 1100100 1100100 1111001 0000000
8-bit ASCII (ISO/IEC 8859, Windows-1252 and UTF8):
01100100 01100001 01100100 01100100 01111001 00000000
UTF16:
00000000 01100100 00000000 01100001 00000000 01100100
00000000 01100100 00000000 01111001 00000000 00000000
To perform these conversions, convert each character to its ASCII representation (in decimal):
d = 100
a = 97
d = 100
d = 100
y = 121
For completeness, we should also include the null-terminator, character code 0.
null = 0
Now convert each decimal value to its 8-bit representation in hexadecimal:
100 = 0x64
97 = 0x61
100 = 0x64
100 = 0x64
121 = 0x79
0 = 0x00
Convert each hexadecimal digit to its 4-bit binary representation:
0x6 = 0110
0x4 = 0100
0x6 = 0110
0x1 = 0001
0x6 = 0110
0x4 = 0100
0x6 = 0110
0x4 = 0100
0x7 = 0111
0x9 = 1001
0x0 = 0000
0x0 = 0000
Place the binary codes in sequence.
"daddy" = 01100100 01100001 01100100 01100100 01111001 00000000
Finally, add or remove leading zero bits to suit the actual encoding.
What is the difference between linking and embedding?
"Linking" refers to providing a "reference" to the source data; if the source is deleted, the link no longer functions; many different types of files, programs, and programming interfaces refer to displaying externally located data as linking. Linking is advantageous when the data might later change and the program or file that contains the link would benefit from having the latest version of the data.
"Embedding" has a slightly different context depending on the context that you are using it. If you are referring to a file (such as a Flash file, Microsoft executable file, and so on), embedding refers to storing the data directly within the other data type. An executable can store Icon files, for example, which alter their presentation on the Desktop or Start Menu by showing an identifying image so users can tell programs apart visually. Embedding in a document file depends on the type of document file in question. Some document files store a copy of the data in the file, while other document formats simply imply that a plugin program is embedded into the document's data. Finally, applications can embed other applications within them during execution. For example, a program could be written to embed an Internet Explorer web viewer into a larger program.
When embedding refers to "storing a copy", the benefit is that the source file can be deleted without affecting this dependent file. The disadvantage, of course, is that updates to the source data require updating the dependent file through whatever means available (applications have to be recompiled, documents have to be edited, etc).
When embedding refers to "running a copy of a program within another program", there are many advantages: less code has to be used each time a component is reused, the component can be upgraded independently of the main program, and a component can crash without crashing the entire application (possibly including recovering data from the failed component). The disadvantage of embedding is, of course, memory usage will be higher than having a single, unified program.