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

Who develeped c language?

It was made in 1972 by Dennis Ritchie while he was working with Bell Telephone Labs.

It was made for use with the UNIX Operating System.

Clothes of primitive man?

what are the materials they used?

What is an array controller?

An array controller is a controller of any array of equivalent hardware components.

How do you make a UIPickerView that plays sounds?

The UIPickerView doesn't actually play the sounds; you do that with a hidden media control. When you click the control button, you examine the selected element in the list and load the associated sound file into the media control, which then plays the file. There are various ways of doing it, but one of the simplest methods is to use two parallel arrays, one containing the titles (which you load into the list), the other containing the paths to the sound files. Both arrays being of type std::string, of course. Thus element 9 in the titles array maps to element 9 in the sound files array. Alternatively, use std::pair objects (where each element in the pair is a std::string) to associate each title with its sound file.

How do you fast multiply a number by 7?

out = in+in; /* 2x */

out += out; /* 4x */

out += out; /* 8x */

out -= in; /* 7x */

or out = (in<<3) - in; /* 8x - x */

Given three points x1y1x2y2 x3y3 write a program to check if all three points fall on one straight line using only conditional statementsififelse nested if only?

#include<stdio.h>

#include<conio.h>

void main()

{

int x1, x2, x3, y1, y2, y3 ;

printf("\nEnter the Co-ordinates of first point(x1,y1)");

scanf("d",&1x, &y1);

printf("\nEnter the Co-ordinates of 2nd point(x2,y2)");

scanf("d",&x2, &y2);

printf("\nEnter the Co-ordinates of 3rd point(x3,y3)");

scanf("d",&x3, &y3);

if( (y2-y1)/(x2-x1)==(y3-y2)/(x3-x2) )

printf("The three points lie on straight line");

else

printf("The three points do not lie on straight line");

getch();

}

How do you get the output like 1 23 456?

When you send some text as output you can insert space sign " " and also there is a tab operator.

How many characters can be read by scanf?

The scanf function in C can read a maximum of characters determined by the format specifier used and the size of the input buffer provided. For example, if you use %s, you should specify a maximum field width to prevent buffer overflow (e.g., %10s reads up to 9 characters plus the null terminator). Without a specified width, scanf will read until it encounters whitespace, but this can lead to undefined behavior if input exceeds the buffer size. Always ensure to use proper buffer sizes and field widths for safety.

How do you make a program in turbo c?

You could try writing it and compiling it. This involves a considerable amount of commitment and study to learn programming (in any programming language).

What is callback function in c?

In computer programming, a callback is executable code that is passed as an argument to other code. It allows a lower-level software layer to call a function defined in a higher-level layer. Usually, the higher-level code starts by calling a function within the lower-level code passing to it a pointer or handle to another function. While the lower-level function executes, it may call the passed-in function any number of times to perform some subtask. In another scenario, the lower-level function registers the passed-in function as a handler that is to be called asynchronously by the lower-level at a later time in reaction to something. A callback can be used as a simpler alternative to polymorphism and generic programming, in that the exact behavior of a function can be dynamically determined by passing different (yet compatible) function pointers or handles to the lower-level function. This can be a very powerful technique for code reuse. Callback functions separate the caller from the callee, the caller doesn't care who the callee is For complete understanding we need to know about Function pointers in c. check the link below

What is the difference between near heap and far heap?

Near and far are obsolete terms used in the MSDOS and Windows 3.x platforms on the 8086/8088 processor. Near represents an area of memory that can be accessed using only a 16 bit offset and, as such, must lie within the default data segment, and is always less than 64kb in size. Far represents an area of memory that must be accessed using both a 16 bit offset and a 16 bit segment and, as such, can lie anywhere in memory and be larger than 64kb, at the expense of additional processing time and program size.

What is the output for the following C program include include void main(void) char str1 Hello world char str2 Hello world printf (d d d d sizeof(str1) sizeof(str2)strlen(str1) strlen(str2))?

What is the output for the following C program?

include<stdio.h>

int main (void) {

char* str1 = "Hello world";

char str2[] = "Hello world";

printf ("%d, %d, %d, %d\n", sizeof(str1), sizeof(str2), strlen(str1), strlen(str2));

return 0;

}

Assuming sizeof (char*) is 4 bytes (implementation-defined) the output will be:

4, 13, 12, 12

In linked list there are no NULL links in?

Linked-lists implemented with sentinel nodes have no NULL links. A sentinel node is simply a node that represents the tail of the list and has no data (and therefore provides no storage). Sentinels greatly simplify linked list implementations because we guarantee the existence of at least one node because the sentinel always exists even when the list is empty.

GOTO NEVER Use in c programes?

The goto statement in C is generally discouraged because it can lead to code that is difficult to read, maintain, and debug. It allows for arbitrary jumps in the program's control flow, which can create complex and tangled logic. Instead, structured programming techniques such as loops and functions should be used to enhance code clarity and maintainability. By avoiding goto, developers can write more predictable and organized code.

What is the Syntax of recursion in turbo c?

Nothing. A function may call itself just like any other function, eg:

int main (int argc, char **argv)

{

if (argc>0) {

puts (argv[0]);

main (argc-1, argv+1);

}

return 0;

}