In an if statement what must enclose the condition?
In an if statement, the condition must be enclosed in parentheses.
In C plus plus all false relational expressions have a mathematical value of?
In C++ all false relational expressions have a mathematical value of 0.
Why main function named as main why not start or anything else?
The int main() function named main because by writing this we are trying to reduce the name conflicts from the above function defination which can be anything by the user defined function
Sum of two matrices in c program?
#include<stdio.h>
#include<conio.h>
main()
{
int a[4][4],b[4][4],c[4][4],i,j;
printf("enter the elements of matrix a");
for(i=0;i<=3;i++)
for(j=0;j<=3;j++)
scanf("%d",&a[i][j]);
printf("the first matris is");
for(i=0;i<=3;i++)
{
printf("\n");
for(j=0;j<=3;j++)
printf("%d",a[i][j]);
}
printf("Enter the elements of second matrix");
for(i=0;i<=3;i++)
for(j=0;j<=3;j++)
scanf("%d",&b[i][j]);
printf("the second matrix is");
for(i=0;i<=3;i++)
{
printf("\n");
for(j=0;j<=3;j++)
printf("%d",b[i][j]);
}
for(i=0;i<=4;i++)
for(j=0;j<=4;j++)
c[i][j]=a[i][j] + b[i][j];
printf("the addition of matrix is");
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
printf("%d\t",c[i][j]);
printf("\n");
}
getch();
}
How can you find the LCM in c without using any loop and condition?
Does a sentinel variable keep a running total?
It is not common, but possible. (If the list members are numbers.)
Find vowel from given string in C plus plus language?
std::string test ("The cat sat on the mat");
std::string vowels ("aeiouAEIOU");
size_t pos = test.find_first_of (vowels);
if (pos != test.npos)
std::cout << "Vowel found at position " << pos << std::endl;
What is the string and cable length on a jennings ck3.1r?
Bear says bow string length is 86.125in & buss cable length 31in
What is the difference between C and advanced C?
The difference between C and the advanced C is that C is basic. On the other hand, the advanced C is thorough and to the detail.
What is while statement and how is it used?
You use a while statement to introduce a conditional loop. Unlike a for loop which is typically used for counted loops, a while loop is used whenever a statement must iterate while an expression evaluates true. The expression is evaluated at the start of each iteration.
Write a program that give all the rotations of a string?
#include<stdio.h>
#include<string.h>
int main()
{
char a[80];
int rotated_element_number[80];
int rotation;
int i;
int length;
printf("enter the word: \n");
gets(a);
length = strlen(a);
printf("the reversed string is:\n");
for( rotation=0; rotation<length; rotation++)
{
for( i=0; i<length; i++)
{
rotated_element_number[i] = i + rotation;
while(rotated_element_number[i] > (length-1)) rotated_element_number[i] -= length;
printf("%c", a[rotated_element_number[i]]);
}
printf("\t");
}
getchar();
return 0;
}
What is interrupt and why used interrupt?
interrupt means to stop the execution of some task and save it, start the new task which is caused by it. interrupt increases the efficiency of a computer and caused by multi-tasking. mehmood Ahmed (Superior university)
What is meant by read and write txt in file handling?
read: moving data from file to memory
write: moving data from memory to file
What is the definition for defining the variable?
choosing a variable to represent one of the unspecified numbers in a problem and using it to write expressions for the other unspecified numbers in the problem.
atoi
ASCII to Integer
Is what it does and that should be enough for you to formulate a full marks answer for your homework.