answersLogoWhite

0

📱

C Programming

Questions related to the C Computer Programming Language. This ranges all the way from K&R to the most recent ANSI incarnations. C has become one of the most popular languages today, and has been used to write all sorts of things for nearly all of the modern operating systems and applications. It it a good compromise between speed, power, and complexity.

9,649 Questions

How do you write a program to find the area of a triangle?

The area of a triangle is one half base times height, so you would write a program to input the base and height, giving the option to stop, calculating and printing the area, and then looping to repeat as desired.

Write an algorithm for round robin?

A round robin algorithm processes a number of tasks, steps or items one by one in a cyclic fashion like so:

1. For N items, n=0, 2, 3, ..., N-1, let nbe 0.

2. Process step (item, task) n

3. Compute n = (n+1) % N, where % is the modulo operator (the remainder of integer division)

4. Proceed to step 2.

How many shorting method in data structure in c?

There are so many sorting methods available in data structure.

  1. Bubble sort
  2. Shell sort
  3. Merge sort
  4. Count sort
  5. Bucket sort
  6. Radix sort
  7. Quick sork
  8. Selection sort
  9. Heap Sort
  10. Insertion sort

Why is parameter passing useful to programmers?

Because all software is written using functions and classes. If you do not know how to pass data from class to class, to function you are not a programmer.

Is there exist a matrix whose eigenvalues are different that of its transpose?

No. Say your matrix is called A, then a number e is an eigenvalue of A exactly when A-eI is singular, where I is the identity matrix of the same dimensions as A. A-eI is singular exactly when (A-eI)T is singular, but (A-eI)T=AT-(eI)T =AT-eI. Therefore we can conclude that e is an eigenvalue of A exactly when it is an eigenvalue of AT.

From where you download understanding pointers in c book by yashwant kanetkar?

you cant download it . goto local store and buy it... he is an excellent author . dont rip off hardworking author like him.

How do you draw a prime number chart?

On a chart with 1-100, highlight or color the boxes of numbers that are prime.

What is a swap meet?

a kind of market in California

C program to add 2 matrices using pointers?

#include
#include

// Note: The code is not very good !!!! But, OK for understanding the concept
// of matrix addition using pointers !!!!!
void main ()
{
int data[2][2], data1[2][2];
int *p1,*p2,i,j;
clrscr();

for (i = 0; i <2;i++)
{
for(j=0;j<2;j++)
{
data[i][j] = i+j;
data1[i][j]= i+ 2*j;
}
}

p1 = data[0];
p2 = data1[0];

for (i = 0; i<2;i++)
{
for(j=0;j<2;j++)
{
printf ("data -- %d\t",p1[i]);
}
printf("\n");
}
for (i = 0; i<2;i++)
{
for(j=0;j<2;j++)
{
printf ("data1 -- %d\t",p2[i]);
}
printf("\n");
}
for (i = 0; i <2;i++)
{
for(j=0;j<2;j++)
{
printf ("Sum %d\t",p1[i]+p2[i]);
}
printf("\n");
}
getch();
}

How many bits are required to represent double data type in memory?

It differs slightly depending on what platform your computer uses or what language you are using.

for the Java programming language, which is platform independent, it is 64-bits.

Which function is used for sleep in c language?

sleep(time in seconds)

(Note: your computer won't actually sleep, only wait, if that's okay with you.)

How can you make a array with the number 16?

If you mean how do you create an array with 16 elements, there are two ways:

int a[16]; /* fixed size array of 16 integer elements */

int* b = malloc(16*sizeof(int)); /* variable length array with (initially) 16 integer elements */

Remember that variable length arrays allocated on the heap must be released as soon as they are no longer required:

free (b);

b=NULL;

When was the worst case of smallpox?

It was in 1875 when a man of Oliver Winston got it on his whole body claiming his life within 2 days. It was in 1875 when a man of Oliver Winston got it on his whole body claiming his life within 2 days.

How do you make Decimal fraction in c plus plus?

Use a double or a float data type. While these are suitable for most floating point purposes, there may be times when you need to deal with extremely small or extremely large numbers with a higher degree of accuracy than is possible with the built-in types. In these cases you must either define your own data type or use a third-party data type. For instance, calculating the millionth decimal digit of pi cannot be achieved with the built-in types alone.

What type of precaution should be used with activated charcoal and infants?

Some activated charcoal products contain sorbitol. Sorbitol is a sweetener as well as a laxative, therefore, it may cause severe diarrhea and vomiting. These products should not be used in infants.

Can you write a program that will read three integers and output a message telling whether exactly two of them are greater than 10?

Yes. Use the following function to determine if two of three values are greater than 10.

bool f (int x, int y, int z) {

if (x<=10 )

return y>10 && z>10;

else if (y<=10)

return x>=10 && z>10;

else if (z<=10)

return x>10 && y>10;

return false;

}

What is the difference between constant and variables In science?

The constant is the thing you keep the same because that is what yo are checking, this can be both good and/or bad. The variables are the things that are being measured withinthe experiment. Hope this helped and good luck getting a good grade on whateverit is you needed this for!