#semester 2
- Write a C program to perform multiplication of two matrices. #include<stdio.h> #include<conio.h> int main() int a[10][10],b[10][10],mul[10][10],r,c,i,j,k; clrscr(); printf("enter the number of row=");... 1
- Explain nested structures with examples. C provides us the feature of nesting one structure within another structure by using which, complex data types are created. For example, we... 1
- Write a program using recursion to find factorial of a number. #include<stdio.h> #include<conio.h> int fact(int); int main() { int x,n; clrscr(); printf(" Enter the Number to Find Factorial :"); scanf("%... 1
- Write a program to print Fibonacci series. #include <stdio.h> #include <conio.h> int main() { int i, n; // initialize first and second terms int t1 = 0, t2 = 1; // initialize the next... 1
- Explain while loop with example. The while loop in C is a control flow statement that repeatedly executes a block of code as long as a specified condition is true. It has th... 1
- What are the tokens of c language explain with example Tokens in C language are the smallest individual units of a program, such as keywords, identifiers, constants, operators, and special symbol... 1
- Distinguish between structure and union. Feature Structure Union Definition A structure is a user-defined data type that groups related data items under a single name. A union is a... 1
- Write a C program to find LCM of two numbers using recursion. #include<stdio.h> #include<conio.h> int lcm(int a , int b) { static int m = 0; m = m + b; if(m % a == 0 && m % b == 0) { return m; } return... 1
- Implement a program to find transpose of a matrix. #include <stdio.h> int main() int a[10][10], transpose[10][10], r, c; printf("Enter rows and columns: "); scanf("%d %d", &r, &c); // asssign... 1
- What are strings and give any four string related functions. String Handling in C Strings in C are represented as one-dimensional arrays of characters terminated by a null character ('\0'). Various fun... 1
- Write a program to check whether a word 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
- Implement a program to perform addition of two matrices. #include <stdio.h> int main() int row,col, i, j, first[10][10], second[10][10], sum[10][10]; printf("Enter the number of rows and columns of... 1
- What are bitwise and logical operators in C ? Bitwise Operators Bitwise operators perform operations on individual bits, and the result is also always a bit. They can work with integral... 1
- Write a program to read Title, Author and Price of 5 books using array of structures. #include <stdio.h> //#include <conio.h> struct book int price; char title[80]; char author[80]; ; void accept(struct book list[80]); //func... 2
- A square prism with side of base 40 mm and axis height 60 mm is resting on HP Given Data Side of prism = 40 mm Axis length = 60 mm Resting on one of its corner = HP Axis inclination with HP = 30° 1
- Figure shows 2 views of casting , Draw an isometric view with suitable origin Figure shows 2 views of casting , Draw an isometric view with suitable origin 1
- Trick for Visible (Dark) and Hidden (Dashed) Lines in Projection of Solids Many times students get confused which line to be made dark (visible) and which line to be made dashed (hidden). Video courtesy:: Youtube Fo... 1
- A line AB, 70mm long, has its end A 15mm above HP and 20mm in front of VP. Given Data:- TL = a’b1’ = ab2 = 70 mm a’ (↑) = 10 mm a (→) = 20 mm θ = 30° Φ= 45° 1
- Calculate the V number of an optical fibre having numerical aperture 0.25 NA = 0.25 Core diameter = 20 μm λ0= 1.55 μm Formula: V = ᴨd / λ0 ×NA V = 3.14×20×10⁻⁶ /1.55 ×10⁻⁶ ×0.25 V = 10.13 1
- What is pumping in LASER? Give the types of pumping. The process of raising large number of atoms from lower energy to a higher energy level is called pumping. Types of pumping: 1. Optical pump... 1
- Calculate the V number of an optical fibre having numerical aperture 0.25 and core diameter 20 μm NA = 0.25 Core diameter = 20 μm λ0= 1.55 μm Formula: V = ᴨd / λ0 ×NA V = 3.14×20×10⁻⁶ /1.55 ×10⁻⁶ ×0.25 V = 10.13 1
- Trick for Visible (Dark) and Hidden (Dashed) Lines in Projection of Solids - Engineering Drawing. Answer: Outline (boundary) lines are always visible. Inside the outline, an edge is visible if it is nearest to the observer for that view,... 2
- Figure shows 2 views of casting , Draw an isometric view with suitable origin Figure shows 2 views of casting , Draw an isometric view with suitable origin 1
- Describe the types of oxide film formed in oxidation corrosion The extent of corrosion depends upon the type of oxide film formed by metals. Oxide films formed are classified into three categories, Stabl... 2