About Me

My photo
Vijayapur, Karnataka, India
I am interested in Teaching.

Wednesday 23 December 2020

Assignment 1....for I and K Division I Sem BLDEAs Engineering College, Vijayapur.....

 Write the same and submit.....

If you have PC , practice.....otherwise no need... Good day.... C program to print Hello World message on monitor(screen) (2 m) #include<stdio.h> void main() { clrscr(); printf("Hello World"); getch(); } Filename: p1.c Output: Hello World C program to find addition of two integers. (8 m) #include<stdio.h> void main() { int n1,n2,ans; clrscr(); printf("Enter two integers"); scanf("%d%d",&n1,&n2); ans=n1+n2; printf("\nAddition is %d",ans); getch(); } File name: p2.c Output: Enter two integers 7 3 [Enter] Addition is 10

Tuesday 8 September 2020

Tips to get jobs after the successful completion of Engineering Course OR How to well settle after Engineering course?

My dear students,

You are clever and intelligent, So, you clicked on this link.

Yes, definitely, you get success in your life and you are going to well settle in your life.

Do you know? Why have you taken admission for engineering course? Yes, you know it. i.e. to get TECHNICAL KNOWLEDGE.

What do you do with TECHNICAL KNOWLEDGE?

Yes, As we know all..

Technical Knowledge helps us to solve Technical Problems.

What happens? when we solve any problems of our parents, brothers and sisters, friends, neighbors or societal members. As we know..Everyone will be happier because you solved their problems. In return you get appreciation. This appreciation is nothing but annual salary package for you from industry side.

I hope, now, you have understood that, to get appreciation or money, we need to solve problems of others. Until unless, we will not  solve the problems of others, we are not able to get appreciation and money.

Can you imagine today's life without money.. it is very difficult to imagine.

Now a day very difficult to survive without money.

How shall I earn money?

Complete the Engineering course with latest technical knowledge.

In interview, questions will be asked according to the requirement of a company.

If, you answer all questions in interview after clearing all previous rounds.

Then, you get job offer letter from an industry side.

They train you according to their need. 

Then, they assign some work to you...like this yours job career begins...

Day by day...you improve and yours experience increases...

then you start changing the jobs from one company to another company to get higher position with more salary....

So, as a fresher , do not worry about a salary...

As a fresher, you become familiar with many real time problems, challenges and solutions. In this way, your job career begins....


So, you have taken admission for engineering course in our esteemed Engineering college i.e. BLDEA's Vachana Pitamaha Dr. P. G. Halakatti College of Engineering and Technology, Vijayapur. Karnataka.

What do we teach to you for 4 years in engineering course?

Yes, you know....

We give technical knowledge from very basics in first year of engineering course, 

then you enter into yours specialization branch. 

There, all teachers from yours domain , they teach you all subjects in 2nd year, 3rd year and 4th year.

Each subject mastery is one JOB for you.

If, you use the gained knowledge collectively from all semesters from all 4 years then amazing contribution you can do the field of TECHNICAL. 

That's why, in the final year you present SEMINAR on latest technology and you do PROJECT WORK by utilizing the gained knowledge in previous semesters (years) 

The project work means , you need to take a latest technical problem from yours domain or area of interest and solve it.

To do the project work, one of the Professors will be guide for you...


You can do the project work alone or in a group....

So, kindly, frame the problem statement for your project work from the interested domain.


To do the project work.... you are doing literature survey (survey of already solved problems with their advantages and disadvantages, 

so, yours objective should be to reduce disadvantages or increase the advantages of already solved problem with a new technique, a method, an algorithm , latest technology, etc. 

Once, you solved the problem defined by you with the expected results. (Project work is over...You need to give demo (Presentation of PPT) on work did by you to domain experts with Project Report)

Like this,  you complete yours engineering course successfully.

So, you should not take tension in INTERNALS , LABORATORY and EXTERNALS.

Read all topics from Module-1 and Module-2 to gain knowledge...Not to face first IA. If you gain knowledge from Module 1 and Module 2 then definitely you do well in first IA.

Similarly, Module-3, Module-4(first half) for 2nd IA

Similarly, Module-4(second half), Module-5 for 3rd IA

Kindly, attend all IA's sincerely to verify your gained technical knowledge. If you are doing well in all IA's means...bright future is waiting for you...

Kindly, do not copy in internals or any examination....Please do not copy...it is wrong. It affects yours bright future and all your dependents will suffer from it.

Do not imitate like others, come with your own intelligence and take everything as a challenge in life...


So,

Now, you are coming to college to gain technical knowledge and not to score marks. If you study well and gain knowledge then marks will flow automatically towards yours marks card.

So,

First listen to teachers in class, read all recommended and reference books, GOOGLE for difficulties, ask all of us , solve previous years QPs.

This is what, yours parents expect from yours side. 

This one you should not FORGET. 

Yours parents are waiting for yours success since 21 years...

Really, yours parents patience of waiting 21 years for yours successfully completion of engineering course is not a joke.

In this way, you complete yours engineering course.

Then during INTERVIEW process of a company, 

N number of rounds will be there based on their requirements. 

Companies are already involved in solving technical problems of their customers that is, already they have customers with technical problems and customers are ready to pay huge amount of money to the company for solving their technical problems. 

So, they are in search of efficient engineering students ; those who are having latest technical knowledge. So that, they can utilize you for their company to solve the technical problems of their customers. So, yours interview and N number of rounds for selection process.

So, 

you need to be healthy first, 
you need to be smart in looking also, as we know to become a smart (good looking) we need to have a good thoughts.

You need to have a good communications skills in Hindi, Kannada and English. 

So, minimum we need to be perfect with TENSES with negative and interogative sentences knowledge, Direct and Indirect, Parts of Speech, Letter writing skills, etc. You need to be bold enough to face all types of problems. 

All yours skills will be utilized by the COMPANY to solve the problems of their customers.

 Yours intelligence and skills will be used by COMPANY in turn they pay you fair SALARY.

So, how shall I settle in my life?

Answer: Gain knowledge and apply to solve the technical problems from private sector or Govt. sector.
M stands for both marks and money

Marks and Money....helps us lot.

Kindly, write comments.............

Article By:

Prof. Chidanand S. Kusur
Asst. Prof., Dept. of CSE
B.L.D.E.A's V. P. Dr. P. G. Halakatti College of Engineering and Technology,
Ashram Road, Vijayapur. Karnataka, India.
9739762682
www.cskusur.blogspot.com
YouTube Channel: Chidanand Kusur
cs.kusur@gmail.com
cs.kusur@bldeacet.ac.in

Note: Send feedback..write comments...It will encourage me to write some more articles....Thanking you...All the best...You have a bright future....

Yours success is yours parents success, brothers and sisters success, institute success, friends success and Nation's success.



 


Monday 24 August 2020

Tips to pass the C for Problem Solving Back Subject for I and II sem B.E. (VTU, Belagavi)

 Dear students,

Always explain more about the asked question and underline the important points.

Do not forget to write SYNTAX and do not forget draw FLOWCHART

Draw BOX around syntax.

Give more examples for asked questions. You can write core part of a program or entire program.

Prepare some programming examples for each topic. 

To calculate simple interest

To calculate are and perimeter of rectangle

Largest of two numbers.

Largest of three numbers.

To check for leap year

To find roots of quadratic equation.

To check for PALINDROME

To print first N fibonacci numbers.

To find matrix multiplication

To implement BUBBLE SORT

To read and display N students information using array of structure

Programming example for dynamic memory allocation.

To swap (interchange) two values using pointer.

Note: If you these programming questions then well and good. Otherwise use these programs as EXAMPLES for respective topics.

Worst case assume that, for one page answer you get 1 marks.

The you need to write minimum 20 pages (front and back 40 pages) to pass the subject. (Safer Side)

Eventhough, you write less pages with quality points,,, you pass...

All teachers are interested to PASS you...But...you need to write more with quality points, syntax, flowchart and programming examples. Most of the students will not do.

All teachers are good...Everyone wants to PASS you...no one is interested to FAIL you..So, please write more.

For Exam preparation...prepare in REVERSE order i.e. 

Module-5 Important topics.

Preprocessor, Pointer, Dynamic Memory Allocation, Structure, Array of Structure

Module-4 Important Topics

Functions, Types, Categories, Actual and Formal Parameters, Call by value and Call by reference, Recursive functions

Module-3 Important Topics

1D array

2D array

Bubble sort program, Matrix Multiplication

Module-2 Important Topics

simple if, if else, nested if, else if ladder, switch

while , do while and for

break , continue, goto

Module-1 Important Topics.

Block diagram of computer

Types of computers

Generations of computers

Input and Output devices.

C tokens

Structure of C Program

Formatted Input and Output Functions

Operators(arithmetic, relational, logical, increment and decrement, bitwise, condition, special)

....

ALL THE BEST



Important C programs for C for Problem Solving for I and II sem of Engineering Students (As per VTU)

 C program to calculate simple interest.


# include<stdio.h>
void main()
{
float p, t, r, si;


printf("Enter P T R ");
scanf("%f%f%f",&p,&t,&r);


si=(p*t*r)/100;


printf("\n Simple Interest is %f", si);
}


Output:
Enter P T R 
100 5 5 [Enter Key]
Simple Interest is 
25.00


 C program to calculate area and perimeter of rectangle.


# include<stdio.h>
void main()
{
float l, b, area, per;


printf("Enter length and breadth of rectangle  ");
scanf("%f%f", &l, &b);

area=l*b;

per=2*(l+b);


printf("\n Area of rectangle is %f", area);

printf("\n Perimeter rectangle is %f", per);

}


Output:
Enter length and breadth of rectangle
10 20 [Enter Key]
Area of rectangle is 200.00
Perimeter of rectangle is 60.00


C program to check for PALINDROME or not.


# include<stdio.h>
void main()
{
int n, rem, rev=0, temp;


printf("Enter a number to be check   ");
scanf("%d",&n);

temp=n;

while (n!=0)

{
rem=n%10;
rev=(rev*10)+rem;
n=n/10;
}

if (rev==temp)

printf("\n PALINDROME");

else

printf("\n NOT Palindrome ");

}


Output:

Enter a number to be check

123
NOT Palindrome

Output:

Enter a number to be check

121
PALINDROME


Monday 17 August 2020

C for Problem Solving (Tips and Important Questions to pass the this subject) Module Wise Important Questions (I and II Sem VTU Syllabus)

 Module-1 ( Use my YouTube Channel for explanation) CHIDANAND S KUSUR

Explain the "Structure of Computer" with neat block diagram. [2 + 3 + 5 =10 Marks]

Tips:

Write What is computer? ...You get 2 marks

Draw diagram: 3 marks 

Input Unit

System Unit : Memory Unit + [ALU + CU]

Output Unit

Explanation of All Units: 5 marks

List of input devices with explanation in brief about each.

List of output devices with explanation in brief about each.

Generations of Computers

Types of Computers


What are C tokens? List and explain all in brief. (2 m + 1 m + 6 m = 9 marks)

What are C tokens? 2 marks

List: 1 mark

Keywords

Identifiers

Constants

Strings

Operators

Special Symbols

Explain all the above 6 : 6 marks


What are formatted I/O functions? List and discuss with syntax and examples.

(2 m + 3 m + 3 m = 8 m)

What are formatted I/O functions? 2 marks

scanf() : Explanation, Syntax, Examples (3 m)

printf() : Explanation, Syntax, Examples (3 m)


What are identifiers? Write rules for defining identifiers with valid and invalid examples for each rule.


Explain "Structure of C Program" with programming example.

[Documentation Part]

[Preprocessor Part]

[Global Part]

int main()

{

declaration part;

executable part;

return (0);

}

[User defined function]

Explain all the above parts with examples.

Give one programming example that covers all the parts.


Write C programs for following

To calculate simple interest

si=(p*t*r)/100;

input: p, t, r

output: si

To find area and perimeter of rectangle.

area=(l*b)

p=2*(l+b)

To find area and circumference of a circle

area=3.142*r*r

cir=2*3.142*r

To find area of triangle by reading breadth and height

area=0.5*breadth*height

To find area of triangle by reading three sides of it.

s=(a+b+c)/2

area=sqrt((s-a)*(s-b)*(s-c))


Module -2

Discuss the following decision making or selection or branching or conditional statements with syntax, flowchart and examples.

simple if

if else

nested if

else if ladder (cascaded if)

switch

Note:

Explain all the above with explanation (1 mark) syntax (2 marks) flowchart (2 marks) Examples (2 marks) for all

Discuss following loop statements with syntax , flowchart and examples.

while

do while

for


Write differences between while and do while

Write differences between break and continue statements.

Write C programs for following

Largest of three numbers

To check for leap year or not

To check for PALINDROME

To check for PRIME number

To find factorial of N

To find GCD and LCM of two numbers


Module 3

What is 1D array? Discuss its declaration and initialization with syntax and examples.

What is 2D array? Discuss its declaration and initialization with syntax and examples.


Module 4

Discuss the three elements of user defined function with syntax and examples.

What are actual and formal parameters?Give example.

Discuss 4 categories of function with programming examples.

Write difference between call by value and call by reference

What is recursive function?Give example.

Module 5

What is structure?Discuss defining structure and structure variables with syntax and examples.

What array of structure?Give programming example.

What is nested structure?Give example.


What is pointer?Discuss its declaration and syntax with examples.

What is dynamic memory allocation?Give programming example.

Discuss malloc, calloc, realloc, free with examples.


Write C program to swap two values using pointers.

Write C program to read and display N students information using array of structure.


What are preprocessors?Discuss three types with examples.

Answer:

Preprocessors are the pre processing tools.

These will be executed before the COMPILATION of C program.

There are helpful to add HEADER files, define SYMBOLIC constants , add EXTERNAL C files and to write compatible C programs.

Types of Preprocesors:

1. Macro substitution directives.

    There are helpful to define symbolic constants.

    Examples:

    #define PI 3.142

    # define MAX 100

    # define MIN 0

     # define N 50

    # define SIZE 100

2. File inclusion directives.

     There are helpful to add header files in C programs. So that, we can access the contents of these header files. Although, helps to add other external C files. So that, we can access the sub programs (user defined functions) to do specific task in current program.

Examples:

# include<stdio.h>

#include<math.h>

#include "string.h"

#include "alloc.h"

#include "d:\\demo\\p1.c"


3. Compiler control directives.

   There are helpful to write portable C programs. i.e. helps to run the same C program on different hardware platform.

Example:

#if (MACHINE==HCL)

#define file "hcl.h"

elif (MACHINE==WIPRO)

#define file "wipro.h"

elif (MACHINE==DELL)

#define file "dell.h"

endif

#include file



All the best!

Put faith on you....This time you can.....

All the best

Write more in exam

Underline important points.

Practice programs, if you wont get in exam, write as examples.

Explanation Syntax and Examples ....compulsory for all questions

All the best.....


NOTE: SEND FEEDBACK

WRITE COMMENTS

WATCH MY YOUTUBE CHANNEL CHIDANAND S KUSUR AND SUBSCRIBE

9739762682

cs.kusur@gmail.com











Saturday 25 April 2020

nested loop in python second printing patterns in python by Chidanand S ...

nested loops in Python first by Chidanand S Kusur

nested loops in Python first by Chidanand S Kusur

nested loops in Python first by Chidanand S Kusur

nested loops in Python first by Chidanand S Kusur

nested loops in Python first by Chidanand S Kusur

nested loops in Python first by Chidanand S Kusur

Armstrong Number Python Program By Chidanand S Kusur

prime numbers between 2 to n in Python by Chidanand S Kusur

Prime number or not in Python By Chidanand S Kusur

Saturday 28 March 2020

Lecture (Class) on "Input and Output Functions in C"

Dear student,

Read it very slowly and try to understand.

Read minimum 3 times or more

Lecture on Input and Output Functions in C

...Take care...

Assignment - 1 Submission Sheet

Dear students,

Those who have sent the assignment to my e mail ID cs.kusur@gmail.com, kindly, fill this form.

Assignment-1 Submission Sheet

Take care....

Monday 16 March 2020

Module 1 Python Notes

Assignment-1 on Python (For VI Semester Mechanical Engineering Students)

What is is Python? List and explain its features in brief. (Explain all or any ten) (10 marks)
Hints:
(4 LED OF I(ndian)  HP G(as) 2M(aintenance)

"Python is a high level, interpreted and object oriented programming language."


Features:

Easy
Expressive
Free and Opensource
High level language
Portable
Object Oriented
Extensible
Embedded
Interpreted
Large standard library
GUI Programming
Dynamically Typed
Multi Threaded
Garbage collection
Maintenance is easier

List and explain in brief about the applications of Python.
Hint: DR 3SSSW ABCD  ENG DP
Applications:
Web development
Desktop GUI applications
Scientific and Numeric Applications
Software Development
Education
Business Applications
Database Access Applications
Network Programming
Games and 3D Graphics Applications
Artificial Intelligence and Machine Learning Applications
Prototyping
3D CAD application
Computer Vision applications
Robotics
Data Analysis, etc.

Discuss with examples about to two working modes with Python.
Interactive mode and Script mode


What is variable? List the rules to declare a variable in Python. Demonstrate with examples.

Explain the rules of precedence of operators in Python with examples.

What is debugging ? Discuss types of errors.
bug means error in computer program.
The process of removing errors from written program is called debugging.
Explain following three types of errors.
syntax error
runtime error
semantic error

What is functions in Python? Discuss function definition and function call with examples.

Write a Python program to find volume of a sphere.
Hint: (volume=(4/3)*(3.142)*radius*radius*radius

Write a python program to find addition, subtraction, multiplication and division of two integers.

Write a python program to find largest of two integers.

Write a python program to check for leap year or not leap year.

Write a python program to convert temperature reading from Fahrenheit to Celsius.

Write a function to find square and cube of a number in python.

Write a function to print following grid on display.
+ - - - - + - - - - +
 |  - - - - | - - - - |

 |  - - - - | - - - - |
 |  - - - - | - - - - |
+ - - - - + - - - - +
 |  - - - - | - - - - |
 |  - - - - | - - - - |
 |  - - - - | - - - - |
+ - - - - + - - - - +







Datatypes 'First' Class

Generations of Computers Notes

Saturday 14 March 2020

Class Ranks for the subject C for Problem Solving I Sem G Division

Dear students,

Congratulations to all,

You need to improve your results for the II semester.

Yours goal must be VTU ranks or scoring out of out in all subjects.

Click on below link....

Class Rank for the subject C for Problem Solving for I Sem. Division

All the best for forthcoming semesters.......

Wednesday 11 March 2020

Assignment-1 C Program for Problem Solving II Semester "A" division

Discuss "Structure of a computer system" with neat diagram.
Diagram= 2 m
Explanation of Input unit: 2 m
Explanation of System Unit: 4 m
Explanation of output unit: 2m 
Total= 10 marks.

Discuss "Generations of Computers" with minimum 6 differences.
Minimum 6 differences with examples. 6 x 2 =12 marks

Discuss the types of computers with few points about each type.
List of types = 2 marks
Explanation of all with minimum 3 points about all= 8 marks

List input devices and explain minimum 4 points about each.
List=2 m
Explanation= 3 m

List output devices and explain minimum 4 points about each.
List=2 m
Explanation= 3 m


Discuss "Structure of C Program" with all programming example.
Structure= 2m
Explanation of Declaration Part= 1m
Explanation of Preprocessor Part= 1m
Explanation of Global Part= 1m
Explanation of main function= 4m
Explanation of user defined function=1m
Programming Example= 5 m
Total=15 marks.

What are C-tokens?List and explain in brief.
Definition=1m
List=2m
Explantion=6 m
Total=9 marks.

What are identifiers? Write rules for defining identifiers with valid and invalid examples for each rule.
Definition=2m
Minimum 5 rules= 2 x 5 =10 m
Total=12 m

Write C programs for following.

To calculate simple interest.
To find area and circumference of a circle.
To find area and perimeter of rectangle.
To find area of triangle by reading its breadth and height.
To find area of triangle by reading 3 sides of it.
To convert temperature reading from fahrenheit to celsius.
To find largest of two numbers using simple if
To find largest of two numbers using if else


Note:
My notes is available in Pixel Print zerox centre with previous year question papers.
Reading my notes is not compulsory. My notes will be act as reference for you.
Dear students, read VTU recommended books, read - understand - represent in your own sentences with quality points.
This preparation helps for IA and VTU main exam.
This preparation must be as if you are preparing for IA or VTU main exam.
You can write answers in ruled pages or notes book or assignment books.
Even you can submit zerox copies to me by retaining original copy with you.

All the best...for first IA.





Sunday 16 February 2020

"Introduction Class" for II Sem. 'A'

Dear students,

Hearty welcome to second semester of your engineering course.

Be positive.

Everyday is a new opportunity for us to re-correct our yesterday's mistake to move ahead to reach our destiny.

Be inspired. Inspire others.

Read for knowledge.

Once, you gain knowledge apply it. (Then, value will come for the knowledge.)

Be regular to classes. You need to give APPLICATION for yours every ABSENT to classes with genuine reason. It is mandatory.

Listen to all teachers.

Give respect to all teachers.

Wish the teachers, when they come in front of you.

Do not use mobile phones in class rooms.

Do not each chewgum or other else in class rooms. It disturbs teachers to teach topics.

For any activity in class, take permission from teacher.

To enter the running class, you need to ask, Excuse me sir!, May I come in....

Follow RULES of college.

Wear ID cards in class room.

Wear Formal dress with smiling face.

Be healthy with good thoughts in your mind.

Ours beauty depends upon our good thoughts.


Our institute has one vision to provide Efficient Engineers to deal with the societal technical problems.

To convert this dream in to reality, our institute has Institute Mission. (Action to convert Institute Vision in to reality)

As a part of Institute Vision and Institute Mission, all departments in our college has individual Department Vision and Department Mission.

Programme means: to which branch, you have taken admission.
i.e. Computer Science and Engineering is a Program.

We have Program Educational Objectives (PEOs), as well as Program Outcomes (POs)

As a part of Department Mission, all teachers are teaching subjects(courses) with some objective, which are called Course Learning Objectives.

All our Institute Vision and Institute Mission, Department Vision and Department Vision are working fine to make your Family Vision and Family Mission successful. i.e. to convert yours dreams into reality.

Our college is accredited by NBA, NAAC and ISO. i.e. to provide Outcome Based Education(OBE) to you....So, be happy...be inspired...recall yours dreams and work...listen to all teachers. We are here, we are working for you to convert your dream in to reality. (Indirectly our dream will be converted into reality).


ALL THE BEST...

Let us start...










Tuesday 7 January 2020

Module Wise Important Questions on "C for Problem Solving " for first and second semester B.E. Examination (VTU, Belagavi)

Module-1

Block diagram of a computer with explanation of each part in brief.

List of input devices with explanation in brief about each.

List of output devices with explanation in brief about each.

Generations of Computers

Types of Computers

What is computer network? list its advantages.

Write differences between LAN, WAN and MAN

Discuss network topologies (bus, star, ring and mesh) with diagram and examples.

Do not forget to send feedback or comment.

Module-2

Structure of a c program with programming example.

C-tokens (list and explain in brief)

What is identifier? Discuss rules for defining identifiers with valid and invalid examples for each rule.

What is variable? Discuss its declaration and initialization with syntax and examples.

What are formatted input and output functions(scanf and printf)? Discuss with syntax and examples.

What are unformatted input and output functions? Discuss with syntax and examples.

List and discuss the following operators with explanation and examples.

Arithmetic
Relational
Logical
increment and decrement
Conditional operator
Bitwise operators
Special operators (comma and sizeof)

What is typecast(type conversion)? Discuss implicit and explicit type conversions with examples.

Write c programs for following.

To find simple interest (algorithm, flowchart, pesudocode, program)

To find area and circumference of a circle (algorithm, flowchart, pseudocode, program)

To find area and perimeter of rectangle.

To find area of triangle by reading breadth and height of it.

To find area of triangle by reading 3 sides of it (a,b,c)

To swap to values using temporary variable.

To swap to values without using temporary variable.

Do not forget to send feedback or comment.

Module-3

Discuss the following conditional(decision making/selection/branching) statements with syntax, flowchart and examples.
simple if
if else
nested if
else if ladder
switch

Discuss the following loop statements with syntax, flowchart and examples.
while
do while
for

Write differences between while and do while statements.

Write differences between break and continue statements.

Discuss the following storage classes used in C with examples.

automatic variables
global variables
static variables
register variables

Programs:
To check for leap year
To check, whether the number N is even or odd number.
To check, whether the number is PALINDROME or not.
To find factorial of N
GCD and LCM using Euclid's algorithm.
To print first N fibonacci numbers.

Do not forget to send feedback or comment.

Module-4

What is one dimensional array? Discuss its declaration and initialization with syntax and examples.

What is two dimensional array? Discuss its declaration and initialization with syntax and examples.

What is string? Discuss its declaration and initialization with syntax and examples.

Discuss all string handling functions with syntax and examples.

Programs:
Bubble sort
Linear search
Binary search
Sum and Avg of N numbers
Find maximum and minimum of N numbers

Do not forget to send feedback or comment.

Module-4

Discuss the 3 elements of user defined functions with syntax and examples.

Discuss categories of function with examples.

What are actual and formal parameters?Discuss with examples.

Discuss parameter passing mechanism. (call by value and call by reference)

What is recursive function?Give example.

Programs:
Function to check for prime number.
Function to find length of a string.


Do not forget to send feedback or comment.

Module-5

What is structure?Discuss declaration of structure and structure variable with syntax and examples.

What is array of structure?Give programming example.

What is nested structure?Give example.

Discuss structures and functions with example.

What is pointer? Discuss its declaration and initialization with syntax and examples.

What is dynamic memory allocation? Discuss memory allocation functions like malloc(), calloc(), realloc(), fee().

What are pre-processors? Discuss three types with examples.

Programs:

Swap two values using pointers.

Standard deviation

C Program to print Pascals Triangle (Click below link)
https://drive.google.com/file/d/1gv62LCGTury6zdevYFfRUUrPRME17fxV/view?usp=sharing

Note: Send your feedback to cs.kusur@gmail.com or Write comments.
     

Important C programs to be practice for C for Problem Solving I or II Semester B.E. Examination, VTU, Belagavi

C program to calculate simple interest.

#include<stdio.h>
void main()
{
float p, t, r, si;
printf("Enter principle amount, rate of interest and time period ");
scanf("%f%f%f",&p, &t, &r);
si=(p * t * r)/100;
printf(" Simple Interest=%f",si);
}

C program to calculate area and circumference of a circle

#include<stdio.h>
void main()
{
float r, area, cir;
printf("Enter radius of a circle ");
scanf("%f",&r);
area=3.142 * r * r;
cir=2 * r *r;
printf("\n Area of circle = %f ",area);
printf("\n Circumference of circle = %f ",cir);

}

C program to calculate area and perimeter of a rectangle

#include<stdio.h>
void main()
{
float l, b, area, per;
printf("Enter length and breadth of rectangle ");
scanf("%f%f",&l,&b);
area= l * b;
per=2 * (l+b);
printf("\n Area of rectangle = %f ",area);
printf("\n Perimeter of rectangle  = %f ",per);
}

C program to calculate area or triangle by reading its breadth and height (Inputs: b and h)

#include<stdio.h>
void main()
{
float b, h, area;
printf("Enter breadth and height of a rectangle ");
scanf("%f%f",&b, &h);
area= 0.5 * b * h;
printf("\n Area of triangle  = %f ",area);
}

C program to calculate area or triangle by reading 3 sides of  triangle (a,b,c)

#include<stdio.h>
#include<math.h>
void main()
{
float a, b, c, s, area;
printf("Enter 3 sides of triangle  ");
scanf("%f%f%f", &a, &b, &c);
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("\n Area of triangle  = %f ",area);
}



Do not forget to send feedback or comment.

C program to swap (interchange) the contents of two variables using temporary variable .

#include<stdio.h>
void main()
{
int a,b, temp;

printf("Enter two integers a and b ");
scanf("%d%d",&a,&b);

printf(" \n Before Swap  ");
printf(" \n a=%d b=%d  ",a,b);

temp=a;
a=b;
b=temp;

printf(" \n After Swap  ");
printf(" \n a=%d b=%d  ",a,b);

}
C program to check, whether the year is LEAP year or not.

# include<stdio.h>
void main()
{
int year;
printf("Enter year to be check");
scanf("%d",&year);
         if ( (year%4==0) && (year%100!=0) || (year %400==0) )
                     printf("Leap Year");
         else
                      printf("Not Leap Year");
}


Note:
If you get this programming question then write the above program.
If you won't get question on it; then us it as example for if else statement.

Do not forget to send feedback or comment.

C program to find largest of two numbers.

#include<stdio.h>
void main()
{
int a,b;
printf("Enter two numbers");
scanf("%d%d",&a,&b);
         if (a>b)
                     printf(" %d is largest",a);
         else
                      printf("%d is largest",b);
}

Note: Use this program as example for if else statement used in C.



C program to find largest of three  numbers.

#include<stdio.h>
void main()
{
int a,b,c;
printf("Enter three numbers");
scanf("%d%d%d",&a,&b,&c);
         if (a>b  && a>c)
                     printf(" %d is largest",a);
         else if (b>a && b>c)
                      printf("%d is largest",b);
         else
                      printf("%d is largest",c);
}

Do not forget to send feedback or comment.

C program to explain the working of switch statement

#include<stdio.h>
void main()
{
int ch;
printf("Enter your choice [1 2 3 ?] ");
scanf("%d",&c);

switch(ch)
{
case 1:
          printf("\n You have selected first choice");
          break;
case 2:
          printf("\n You have selected second choice");
          break;
case 3:
          printf("\n You have selected third choice");
          break;
default:
          printf("\n Sorry! Invalid choice ");
          break;
}


}


C program to check a number for palindrome or not.

#include<stdio.h>
void main()
{
int num, rem, rev=0,temp;

printf("Enter number to be check ");
scanf("%d",&num);

temp=num;

while (num !=0)
{
rem=num%10;
rev=(rev*10)+rem;
num=num/10;
}

if (temp = = rev)
      printf("\n Palidrome");
else
     printf("\n Not palindrome");

}

Do not forget to send feedback or comment.

C program to find factorial of number n

#include<stdio.h>
void main()
{
int n, i, prod=1;

printf("Enter a number ");
scanf("%d",&n);

for(i=1; i<=n; i++)
{
prod=prod*i;
i=i+1;
}   

printf("\n Factorial is %d", prod);

}


C program to implement BUBBLE sort technique

#include<stdio.h>
void main()
{
int n, i, j, temp ;
int a[100];

printf("Enter number of elements  ");
scanf("%d",&n);

printf("\n Enter %d numbers to be sort ",n);

for(i=0; i<n; i++)
{
scanf("%d", &a[i]);


for(i=0;i<n;i++)
{
    for(j=0;j<n-i-1;j++)
   {
                 if(a[j]>=a[j+1])
                {
                 temp=a[j];
                 a[j]=a[j+1];
                 a[j+1]=temp;
                 }
   }
}

printf("\n After Bubble Sort");

for(i=0; i<n; i++)
{
printf("\n %d", a[i]);



}

Do not forget to send feedback or comment.


C program to implement ADDITION OF TWO MATRICES 

#include<stdio.h>
void main()
{

int m,n,p,q;
int i, j;
in a[100][100],b[100][100],c[100][100];

printf("Enter the order of matrx A ");
scanf("%d%d",&m,&n);

printf("Enter the order of matrx B ");
scanf("%d%d",&p, &q);

if (m = = n  && p = = q)
{

printf("\n Matrix Addition is possible ");

printf("\n Enter elements of matrix A  ");
       for(i=0; i<m; i++)
       {
            for(j=0;j<n;j++)
            {
             scanf("%d", &a[i][j]);
            }
        }

printf("\n Enter elements of matrix B  ");
       for(i=0; i<p; i++)
       {
             for(j=0;j<q;j++)
            {
             scanf("%d", &b[i][j]);
             }
        }


       for(i=0; i<m; i++)
       {
               for(j=0;j<n;j++)
              {
                c[i][j]=a[i][j] +b[i][j];
              }
        }


printf("\n Resultant Matrix C  ");
       for(i=0; i<m; i++)
       {
                   for(j=0;j<n;j++)
                   {
                    printf(" %d ", c[i][j]);
                    }
         printf("\n");
        }

}
else
printf("\n Addition is not possible");
}

C program to implement MULTIPLICATION  OF TWO MATRICES 
In order to find matrix multiplication, the columns of first matrix must be equal to rows of second matrix.


#include<stdio.h>
void main()
{

int m,n,p,q;
int i,j,k;
in a[100][100],b[100][100],c[100][100];

printf("Enter the order of matrx A ");
scanf("%d%d",&m,&n);

printf("Enter the order of matrx B ");
scanf("%d%d",&p, &q);

if (n = = p)
{

printf("\n Matrix Multiplication is possible ");

printf("\n Enter elements of matrix A  ");
       for(i=0; i<m; i++)
       {
            for(j=0;j<n;j++)
            {
             scanf("%d", &a[i][j]);
            }
        }

printf("\n Enter elements of matrix B  ");
       for(i=0; i<p; i++)
       {
             for(j=0;j<q;j++)
            {
             scanf("%d", &b[i][j]);
             }
        }


       for(i=0; i<m; i++)
       {
               for(j=0;j<n;j++)
              {
                c[i][j]=0;
                      for(k=0;k<n;k++)
                      {
                        c[i][j]=c[i][j]+a[i][k]*b[k][j];
                       }
              }
        }


printf("\n Resultant Matrix C  ");
       for(i=0; i<m; i++)
       {
                   for(j=0;j<q;j++)
                   {
                    printf(" %d ", c[i][j]);
                    }
         printf("\n");
        }

}
else
printf("\n Matrix Multiplication is not possible");
}

C program to find length of a string without using built in function

#include<stdio.h>
void main()
{
char str[50];
int length=0;

printf("Enter a string ");
scanf("%s",str);

for(i=0;  str[i]!='\0' ; i++)
{
length=length+1;


printf("\n String length is %d", length);

}

C program to read and display N students information (Roll No, Name, Average Marks) using arrays of structure.

#include<stdio.h>

struct student
{
int rno;
char name[50];
float avg;
};

void main()
{
struct student s[50];
int n, i;

printf("Enter number of students ");
scanf("%d", &n);

printf("\n Enter roll number, name and average marks  of %d students", n);

for(i=0;i<n;i++)
{
scanf("%d %s %f",&s[i].rno, s[i].name,&s[i].avg);
}

printf("\n Student Details \n");

for(i=0;i<n;i++)
{
printf ("\n  %d     %s      %f", s[i].rno, s[i].name, s[i].avg);
}

}


C program to  swap two numbers using pointers and functions.

#include<stdio.h>

void swap(int *x, int *y);

void main()
{
int x=7, y=3;

printf("\n Before Swap \n");
printf("x=%  y=%d",x,y);

swap(&x, &y);

printf("\n After Swap \n");
printf("x=%  y=%d",x,y);

}

void swap(int *x, int *y)
{
int temp;
temp=*x;
*x=*y;
*y=temp;
}


Note: Do not forget to send Feedback/Comments.
          I upload other programs shortly......