answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is the most basic loop in c?

Answer

the answer to this question would vary from programmer to programmer... Basically for the embedded system programmer the while loop is more important and would be considered as basic. However for the application programmer the for loop is always a better option.

Answer

These are: LABEL-goto, while, for, do-while, and recursion, of course.

Write a program to find the square root of the quadratic equation using flow chart?

You don't need a flow chart for that; just use the quadratic formula directly; most programming languages have a square root function or method. You would only need to do this in many small steps if you use Assembly programming. The formulae would be something like this:

x1 = (-b + sqrt(b^2 - 4*a*c)) / (2 * a)

and

x2 = (-b - sqrt(b^2 - 4*a*c)) / (2 * a)

where a, b, and c are the coefficients of the quadratic equation in standard form, and x1 and x2 are the solutions you want.

What is the difference between object linking and object embedding?

hai guy, you see the word art in ms word application?? the typed word art text is the object. when you double click on it it will display the wordart text editor . so the object links the editor. that y called ole. regards s.s.senthil kumar Tamilnadu, India hai guy, you see the word art in ms word application?? the typed word art text is the object. when you double click on it it will display the wordart text editor . so the object links the editor. that y called ole. regards s.s.senthil kumar Tamilnadu, India ssmailid@yahoo.com

How much money does a computer programmer earn per week?

Depends on what they're doing and who they work for. Look at a site such as Monster or go through the classifieds in your newspaper to get an idea. Very roughly, it could range from as low as $30K a year (very low) to over $100K a year.

== ==

How do you use qsort function to sort an array of structures?

It depends what language you are using and how the function is implemented. However, generally, you need to pass 4 arguments to the function:

1. A reference to the array.

2. The lower bound of the sub-array to be sorted (usually 0).

3. The upper bound of the sub-array to be sorted (usually n-1 for an array of n elements).

4. A binary predicate to perform comparisons between the elements (usually a less-than predicate).

How do you you delete a node in singly linked list only pointer to that node is given in C?

Firstly, thanks for trying solve this algorithm.

I will rewrite the wrong way and debug it in the next line, and the causes in th last line , O right?


wrong:void delete(int n).
debug:void delete_node(node* list, int n).
causes:
-You have to include the name of the list from which you want to delete a node. -you used delete as a name of the function, and that is impossible because delete is a predefined function, use delete_node for example.




wrong:you didn't affect the address of the list to the temporary pointer named here P.
debug:p=list.
causes:
-one of the disadvantages of the chained list -unlike contiguous list-is: to arrive to the the required node, we have to traverse all previous nodes to get the required one, therefor we use that temporary pointer, and this latter mast have to start from the first node names here list.


the rest is right, try this code, I think it works::


void delete_node(node *list, int n)
{
node *p;
p=list;
int i=1;
while(i
{
p=p->next;
++i;
}
node *q;
q=p->next;
p->next=q->next;
free(q);
}



Best regards of InfoMan.






How do you find base of an unknown number in number system?

You first determine the algebraic numerical equilibrium ( algorythm ) and divide it by the sum of the true algebraic expression (X)-(X=?>y^Zy<~=X)Answer. Basic Pythagoras Theorem co-tangent w/equilibrium.

What are the 2 high level programming language?

BASIC , FORTRAN ,COBOL , PASCAL are high level lanhuages which are simply understood by us used in the computers.

What are watts and kilowatts?

A watt is a unit of power referring to rate of energy conversion. It is equal to one Joule per second. A kilowatt is equal to 1,000 watts - a unit of energy equal to approximately 1.34 Horsepower.

Class data types in c?

The data types indicate the type of values that can be stored. The primary data types in c are:

1. int, short, long, long long - used for integer values

2. float, double - used for storing floating point numbers

3. char - used for storing ASCII characters

What is difference between reference and object?

References are stored in stack while objects are stored in heap.

Reference holds the memory address of an object, that's why they are called reference. If they don't refer to any object in heap, they hold 'null', meaning nothing.

Objects hold the actual data in them. This data is accessed (either read, or written) through reference. An object may be referenced by zero or more references.

For example, consider a class Person, which can hold 'name'.

I create 2 reference variables of Person type.

Person p1;

Person p2;

at this moment both references contain 'null'. An attempt to access 'name' data will throw an error. Now assigning new object to 'p1'.

p1 = new Person();

this causes an object to be created in heap, and its reference(memory address) is stored in p1. Now I can access 'name' data of this object created through p1.

p1.name = "Tom";

Assigning p2 to p1, will make p2 pointing the same object in the heap as p1 is pointing to. Thus if you change 'name' through p2, you are actually changing the same object as p1 is pointing to.

p2 = p1;

p2.name = "Sam";

both p1 and p2 reference variables that are in stack, are pointing to the same object that is in heap.

Hope this helps :)

What is IT architecture and infrastructure?

Basically it's all of your networks and supporting systems and in some cases the entire IT department as well.

What are the characteristics of each generations of programming language?

Programming languages are categorized into generations based on their level of abstraction and ease of use.

  1. First Generation (1GL): These are low-level languages, primarily machine code, which are specific to a computer's architecture and require extensive knowledge of hardware.

  2. Second Generation (2GL): Assembly languages fall into this category, providing a slightly higher abstraction with mnemonic codes representing machine instructions, making it easier for programmers to write code.

  3. Third Generation (3GL): High-level languages like C, Java, and Python focus on human readability and abstraction from hardware, allowing for more complex programming without detailed knowledge of the machine.

  4. Fourth Generation (4GL): These languages are even more abstract, often domain-specific, and designed for specific tasks like database management, enabling rapid application development with less code.

  5. Fifth Generation (5GL): This generation involves languages used for artificial intelligence and incorporates constraints and logic programming, focusing on solving problems rather than writing code.

Write a C function to sort two dimensional integer array in ascending order?

Here's an example using a bubble sort. Note that this is not a very efficient sort, but it works weel enough with small data sets.

#include

#include

int main(void)

{

int item[100];

int a, b, t;

int count;

/* read in numbers */

printf("How many numbers? ");

scanf("%d", &count);

for(a = 0; a < count; a++)

scanf("%d", &item[a]);

/* now, sort them using a bubble sort */

for(a = 1; a < count; ++a)

for(b = count-1; b >= a; --b) {

/* compare adjacent elements */

if(item[ b - 1] > item[ b ]) {

/* exchange elements */

t = item[ b - 1];

item[ b - 1] = item[ b ];

item[ b ] = t;

}

}

/* display sorted list */

for(t=0; t

return 0;

}

How to print ASCII values using c?

Well in C++:

#include <iostream>

int main()

{

char x;

for(int i = 0; i < 255; i++)

{

x = i;

std::cout << i << "\t" << x << std::endl;

}

char wait;

std::cin >> wait;

return 0;

}

How is XHTML used?

Many modern websites use XHTML now; although some are still left in the dark, pondering with HTML. Thus, many corporations, businesses, organizations, freelancers, entertainers, general website developers, and others use XHTML.

What are tokens in c language?

in c program the smallest individual unit is called c-token

Example a program using two dimensional array multiplication table?

#include <stdio.h>

int main() {

int TimesTable[12][12] = { {1,2,3,4,5,6,7,8,9,10,11,12}, {1,2,3,4,5,6,7,8,9,10,11,12} };

int a, b;

for (a = 1; a <= 12; ++a) {

for (b = 1; b <= 12; ++b) {

TimesTable[a][b] = a*b;

printf("%5d", a*b);

}

printf("\n\n");

}

return 0;

}

How do you put a video on power point?

YouTube doesn't accept PowerPoint files. It only accepts the following video formats:

  • Windows Media Video (.WMV)
  • .3GP (cell phones)
  • .AVI (windows)
  • .MOV (mac)
  • .MP4 (iPod/psp)
  • .MPEG
  • .FLV (adobe flash)
  • .MKV (h.264)

If you want to upload PowerPoint to YouTube, you should convert the PowerPoint to video format like WMV, MP4, AVI or FLV.

There are many ways for us to convert PowerPoint to video. Check the details in the following link: ways to convert poweroint to video

To convert PowerPoint to video with timing intact, the recommend one is Wondershare PowerPoint to video Converter.

What is application interface?

An application programming interface (API) is a set of routines, data structures, object classes and/or protocols provided by libraries and/or operating system services in order to support the building of applications.

An API may be: * Language-dependent, that is, only available in a particular programming language, utilizing the particular syntax and elements of the programming language to make the API convenient to use in this particular context. * Language-independent, that is, written in a way that means they can be called from several programming languages (typically an asm/c-level interface). This is a desired feature for a service-style API which is not bound to a particular process or system and is available as a remote procedure call.

What is assembler can do?

It converts machine level language to high level language simultaneously...and vice versa..