All questions
- Explain different storage classes. Answer: The four storage classes in C are automatic, register, static and external (global). A storage class tells four things about a varia... 2
- Write a program to find the LCM of two number using functions. #include <stdio.h> #include <conio.h> int get_lcm( int a, int b); // function declaration int main() int n1, n2, lcm; // declaration of vari... 1
- Explain the top down approach and bottom up approach to prepare nanomaterials. Top-down approach: In Top-down approach a bulk solids are dis-assembled that is broken or dissociated into finer pieces until the particles... 1
- Write a program to store the name, runs, scored and wickets taken of n cricketer #include<stdio.h> struct cricketer int runs,wickets; char name[25]; player[100],t; void main() int i,j,n; printf("Enter the no of cricket pl... 1
- Comparison between union and structure S.no C Structure C Union 1 Structure allocates storage space for all its members separately. Union allocates one common storage space for al... 1
- Comparison between array and structure. Answer: An array is a collection of elements of the same data type accessed by an index, while a structure is a collection of members of dif... 1
- Why should I use functions at all? There are two reasons for using functions: (a) Writing functions avoids rewriting the same code over and over. Suppose you have a section of... 1
- What is more efficient, a switch statement or an if-else chain? As far as efficiency is concerned there would hardly be any difference, if at all. If the cases in a switch are sparsely distributed the com... 1
- What is size_t ? in c programming It is the type of the result of the sizeof operator. size_t is used to express the size of something or the number of characters in somethin... 1
- What are the different types of linkages? There are three different types of linkages—external, internal and none. External linkage means global, non-static variables and functions,... 1
- What are the differences between a declaration and a definition? There are two differences between a declaration and a definition: In the definition of a variable space is reserved for the variable and som... 1
- What do you mean by scope of a variable? What are the different types of scopes that a variable can have? Scope indicates the region over which the variable's declaration has an effect. The four kinds of scopes are—file, function, block and proto... 1
- Is it true that Operating Systems like Windows, Linux and UNIX are written in C? Major parts of popular operating systems like Windows, UNIX, Linux are still written in C. This is because even today when it comes to perfo... 1
- Write a program to check whether the enter string is palindrome or not. #include<stdio.h> #include<conio.h> #include<string.h> int main(){ char str[20]; int i, len, temp=0; int flag = 0; printf("Enter a string:")... 1
- Write a program to add two matrices m x n #include<stdio.h> int main() int i, j, rows, columns, a[10][10], b[10][10]; int arr[10][10]; printf("n Please Enter Number of rows and colum... 1
- Write a program to accept ‘n’ integer from user into an array and display them in one each line. Answer: Read n, store the n integers in an array with one loop, then print a[i] followed by a newline in a second loop. #include <stdio.h> i... 1
- Explain the recursive function. Write a program to find the factorial of a number using recursive function. A function that calls itself is called as a recursive function and the implementation of a program that uses recursive function is called as... 1
- Write syntax of break and continue statement with example. It is sometimes desirable to skip some statements inside the loop or terminate the loop immediately without checking the test expression. In... 1
- How to draw corner square prism
- An object of height 7 cm is kept at a distance of 25 cm in front of a concave mirror. Answer: keep the screen 37.5 cm in front of the mirror. The image is real, inverted and magnified, 10.5 cm tall. Using the Cartesian sign co... 1
- n Young’s double slit experiment, a thin uniform sheet of glass is kept in front of the two slits, (A) The interference pattern will remain unchanged 2
- In Young’s double slit experiment, the two coherent sources have different intensities. (D) 9:4 the ratio of intensities of the two sources is 9:4 2
- When unpolarized light is passed through a polarizer, its intensity (B) decreases 2
- Which property of light does not change when it travels from one medium to another? (D) frequency 2