About Me

My photo
Vijayapur, Karnataka, India
Learn with joy and Grow with values (Happy Learning)

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......


Day-1 24-08-2026 , Hands on material on basic of digital image processing in Python using OpenCV package.

BLDEAS V. P. Dr. P. G. Halakatti College of Engineering & Technology, Vijayapura   FACULTY DEVELOPMENT PROGRAMME (FDP) “Advances in ...