You might recall that the Euler number e can be represented by the following series:
Write a program that approximates e with desired number of terms as entered by the user.
See Answer →Explain how will you allocate memory dynamically for a two dimensional array of floating point numbers.
See Answer →How would you differentiate between the terms pointer to an array and array of pointers? Give proper examples.
See Answer →Explain, with an example, the difference between passing by value and passing by reference.
See Answer →Write a C program to check whether a given string is a palindrome or not.
See Answer →Explain the use of the string library functions strncpy() and strncat(), with the help of an example for each.
See Answer →Suppose you wish to solve the equation x5 + 3x2 − 10 = 0 for x. Rearrange this equation to get an appropriate fixed point iteration method. Then write a program to get an approximate value of the root of the equation. The initial guess must be entered by the user. Your programme must be able to flag a warning message if the initial guess is too far from the exact root. In that case, your program must be able to suggest an initial guess to the user. Terminate the program and print the current value of the root as soon as the difference between two successive approximations becomes smaller than 0.005.
See Answer →Explain the arguments of the functions scanf() and printf(), and how they work with an example for each.
See Answer →Write a loop that examines each character in a character type array called text, and determines how many of the characters are letters, how many are digits, how many are whitespace characters, and how many are other characters.
See Answer →Parenthesise the following C statement for its proper evaluation.
x + = a%b + c ∗ d/e ! = f + + − g
Further, if all the variables from a to g are initialised by 2, then what will be the value of x?
See Answer →Write a C program that takes a list of floating point numbers as input from the keyboard, and prints their mean and standard deviation.
See Answer →Write the output of the following C codes, with proper justification for each.
i) main()
{
int x = 2, y = 2, z = 2;
x = y == z;
y = z == x;
z = x == y;
printf("%d", z);
} ii) main()
{
int x = -1, y;
x++;
y = x ? 2+x : 3-x;
printf("%d", y);
}
iii) main()
{ int i, j, a = 0;
for(i = 1, j = 1; i <= 5; j++)
{
a = a + i*j++; i = j;
}
printf("%d ", a);
}
iv) main()
{
int x = 5, y = 12;
int *p = &x, *q = &y, *r;
r = p;
p = q;
q = r;
printf("%d, %d", x, y);
}
v) func(int x)
{
static int a = 0;
a += x;
return(a);
}
main()
{ int p;
for(p = 1; p <= 5; ++p)
printf("%d", fun(p));
}
See Answer →Disposal of waste materials
See Answer →Disposal of laboratory animals
See Answer →The constant cycle system of stock control
See Answer →Computers as tools of communication
See Answer →What is the full form and function of IAEC? Explain.
See Answer →
What are the occupational diseases? Write any five provisions of the Factories act.
See Answer →Write the first-aid procedure for electric shock.
See Answer →
Differentiate between the unserviceable and obsolete items in a laboratory giving examples for both the types.
See Answer →