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

What poet hated capital letters?

The poet who famously disliked using capital letters in his work is e.e. cummings. He believed that not using capital letters emphasized the equality of words and gave his poetry a more modern and unique look.

What is the main function of a video production company?

The main function of a video production company is to create videos for specific events or for companies. These companies are useful because they create high quality videos that help to add significance to the event or company.

66 c of b?

66 c of b typically refers to 66 cups of butter. That amount of butter is equivalent to approximately 16.5 pounds or 7.5 kilograms. It is a considerable quantity and would be used for large-scale baking or cooking purposes.

What is Latinate syntax?

A Latinate syntax refers to the set of the structured text with a fixed format that has semantic content in Latin. The syntax errors on the other hand refers to the spelling mistakes or the incorrect markup within a given code.

Write a program in c which will read a string rewrite it in alphabetical order?

#include<stdio.h>

#include<string.h>

#include<conio.h>

void main()

{

char a[30],temp;

int n=0,j,i;

clrscr();

printf("Enter the string\n");

gets(a);

while(a[n]!='\0')

{

n++;

}

for(i=0;i<n;i++)

{

for(j=0;j<n-i-1;j++)

{

if(a[j]>a[j+1])

{

temp=a[j];

a[j]=a[j+1];

a[j+1]=temp;

}

}

}

printf("The string in alphabetical order is\n");

for(i=0;i<n;i++)

{

printf("%c",a[i]);

}

getch();

}

How Print serices1 4 27 256 3125 in c?

int main (void) { puts ("1 4 27 256 3125"); return 0; }

Write a program to aceept 5 numbers from keyboard n print itz total?

#include

using std::cin;
using std::cout;
using std::endl;

int main()
{
int arrSize = 5;
double arr[arrSize] = {0.0};
cout << endl << "Enter 5 numbers to find its total." << endl;
for (int i = 0; i < arrSize; i++)
{
cout << "Enter " << (i + 1) << " element: ";
cin >> arr[i];
}

double sum = 0.0;
for (int i = 0; i < arrSize; i++)
{
sum += arr[i];

}

cout << endl << "Total is: " << sum << endl;


system("PAUSE");
return 0;

}

What is the restriction to be followed when using a modulo operator modulo operator?

When using the modulo operator in mathematics or programming, there is a restriction that the divisor (the number after the modulo operator) should be non-zero. A zero divisor would result in a division by zero error, which is undefined.

What is a quick way to use Visual Studio.Net to compile and run a C?

You can write perfectly good C programs in C++. C programs are essentially just C++ programs that make use of the C standard libraries (and other libraries written for C) rather than making use of C++ standard libraries (and other libraries written for C++). However, non-trivial C programs are better written in C++ as the resultant code will generally be smaller and much more efficient, not to mention easier to manage.

C program to calculate the roots of a quadratic equation using two pointer parameters?

#include <stdio.h> #include <conio.h> #include <math.h> void main() { float a, b, c; float root1, root2,de,d; printf("enter the values of a, b and c"); scanf("%f%f%f", &a,&b,&c); de=(b*b)-4*(a*c); d=sqrt(de); root1=(-b+d) /(2.0*a); root2=(-b-d) /(2.0*a); printf(" roots of the equation are %f %f", root1,root2); getch(); }

C program to detect occurrence of vowel with specification in given line text?

#include
#include
#include
void main()
{
int n,a=0,e=0,i=0,o=0,u=0;
char s[30];
char *p;
clrscr();
p=s;
printf("Enter a Word:");
gets(s);
while(*p!='\0')
{
if((*p=='A')(*p=='a'))
a++;
if((*p=='E')(*p=='e'))
e++;
if((*p=='I')(*p=='i'))
i++;
if((*p=='O')(*p=='o'))
o++;
if((*p=='U')(*p=='u'))
u++;
p++;
}
printf("\n\nA's Occurence in the Sentence=%d",a);
printf("\n\nE's Occurence in the Sentence=%d",e);
printf("\n\nI's Occurence in the Sentence=%d",i);
printf("\n\nO's Occurence in the Sentence=%d",o);
printf("\n\nU's Occurence in the Sentence=%d",u);
getch();
}

Output:

Enter a Word:Vowel Letters Are A,E,I,O,U


A's Occurence in the Sentence=2

E's Occurence in the Sentence=5

I's Occurence in the Sentence=1

O's Occurence in the Sentence=2

U's Occurence in the Sentence=1

What is the rebus puzzle answer with e space then n space then d?

The rebus puzzle answer with "e space then n space then d" is "the end".

What is the main function of the eye muscles?

The main function of the eye muscles is to control the movement and coordination of the eyes, allowing for precise and coordinated eye movements. They enable the eyes to track moving objects, focus on near and far objects, and maintain binocular vision for depth perception.

How do we declare enmurated data type?

Enumerated data types can be declared using the enum keyword followed by the name of the enumeration and a list of possible values enclosed in curly braces. Each value is separated by a comma. For example, enum Color { Red, Green, Blue } declares an enumeration named Color with three possible values: Red, Green, and Blue.

Write a c program to check Armstrong number using functions?

TO PRINT ALPHABET PYRAMID

ABCDEFGGFEDCBA

ABCDEFFEDCBA

ABCDEEDCBA

ABCDDCBA

ABCCBA

ABAB

A

#include

#incldue

int main( )

{

int r,c,askey,sp;

clrscr( );

for( r=7; r>=1; r-- )

{

for(sp=6; sp>=r; sp--)

printf(" "); //2 spaces

askey=65;

for(c=1; c<=r; c++ )

printf("%2c", askey++ );

for(c=r-1; c>=1; c-- )

printf("%2c", --askey);

printf("\n");

}

getch();

return 0;

}

by BRAMHA VARDHAN

What are chess timers for?

A chess timer or time clock is a device with two timing clocks side by side, one for each player. There is a button or plunger on the top of each timer. When one of the buttons or plungers is pressed, that timer stops running and automatically starts the other timer running. Depending on the situation or agreement between the players, the time period may vary. Its purpose is to either force players to make a minimum number of moves within a particular period of time or to make any type of move before the time runs out while it is that player's move. In official tournament matches the clocks are set for two and a half hours each with the requirement that each player must make at least 40 moves within that time. After that time, the game may go on with no further time restraints. In non-official games, the players may agree to any time period as they choose. For example, a "Blitz" game is usually 5 minutes long, but the purpose of the time period is not to force a certain number of moves within that time. A Blitz game is a kind of Musical Chairs on the chess board. If a player's time runs out while it is his/her move, that player loses. In informal games, the players may agree on any period of time. Many players love Blitz games for the rush of action that occurs as each player moves pieces almost by instinct rather than carefully thought out strategies There simply is no time for too much thought. There are two types of clocks. One is where the clock simply stops when the player presses the button/plunger. The other type is where the clock stops but backs up about 3 seconds. This is to compensate for the time it takes the player to move his/her hand from the moved piece over to the timer to stop his/her clock.

What is the difference between struct and union in c file management?

The main difference is in how the data structures are stored. In a union, all of the elements are stored in one location. A structure stores each of its elements in a separate memory location.