All questions
- Python Program to Convert Kilometers to Miles # Taking kilometers input from the user kilometers = float(input("Enter value in kilometers: ")) # conversion factor conv_fac = 0.621371 # c... 1
- Python Program to Generate a Random Number # Program to generate a random number between 0 and 9 # importing the random module import random print(random.randint(0,9)) 1
- Python Program to Swap Two Variables x = input('Enter value of x: ') y = input('Enter value of y: ') # create a temporary variable and swap the values temp = x x = y y = temp pr... 1
- Python Program to Solve Quadratic Equation import cmath a = 1 b = 5 c = 6 # calculate the discriminant d = (b**2) - (4*a*c) # find two solutions sol1 = (-b-cmath.sqrt(d))/(2*a) sol2 =... 1
- Python Program to Calculate the Area of a Triangle a = float(input('Enter first side: ')) b = float(input('Enter second side: ')) c = float(input('Enter third side: ')) s = (a + b + c) / 2 ar... 1
- Python Program to Find the Square Root num = float(input('Enter a number: ')) num_sqrt = num ** 0.5 print('The square root of %0.3f is %0.3f'%(num ,num_sqrt)) 1
- Python Program to Add Two Numbers num1 = 1.5 num2 = 6.3 sum = num1 + num2 print('The sum of {0} and {1} is {2}'.format(num1, num2, sum)) 1
- Python Program to Print Hello world! print('Hello, world!') 2
- Distinguish between Electrolytic cell and Voltaic Cell Characteristic Electrolytic Cell Voltaic Cell Purpose To drive a non-spontaneous chemical reaction by using an external electrical energy so... 2
- Q1) Define a) corrosion b) electrode potential c) electrochemical cell d) wavelength e) electroplating a) corrosion Destruction or deterioration or disintegration of a metal by chemical or electrochemical reaction with its environment is calle... 2
- Write a program to find the largest of n numbers taken from user, using a function the array of numbers must #include<stdio.h> #include<conio.h> void main() { int n,i,a[100],large; int largest (int a[], int n); clrscr(); printf("Enter the number of... 1
- Explain different storage classes. The different locations in the computer where we can store data and their accessibility, initial values etc. vary based on the way they are... 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. Sr. No. Key Structure Array 1 Definition Structure can be defined as a data structure used as container which can hold variables of differen... 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