0% found this document useful (0 votes)
37 views9 pages

Homework Assignment For ESC205: 2. Write A Program in C To Find The Square of Any Number Using The Function. The Code

This document outlines 10 homework assignments for an ESC205 class that involve writing C programs to perform tasks like finding the square of a number using a function, checking if a number is even or odd using a function, demonstrating the use of address and value operators, finding the maximum of two numbers using a pointer, printing an array in reverse order, sorting an array using a pointer, counting vowels and consonants in a string using a pointer, finding the largest element using calloc(), and converting binary to octal using a function. For each assignment, students are instructed to write the code and expected output.

Uploaded by

the great man
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views9 pages

Homework Assignment For ESC205: 2. Write A Program in C To Find The Square of Any Number Using The Function. The Code

This document outlines 10 homework assignments for an ESC205 class that involve writing C programs to perform tasks like finding the square of a number using a function, checking if a number is even or odd using a function, demonstrating the use of address and value operators, finding the maximum of two numbers using a pointer, printing an array in reverse order, sorting an array using a pointer, counting vowels and consonants in a string using a pointer, finding the largest element using calloc(), and converting binary to octal using a function. For each assignment, students are instructed to write the code and expected output.

Uploaded by

the great man
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Homework Assignment for ESC205

2. Write a program in C to find the square of any number using the function.

The Code:

The Output:
3. Write a program in C to check a given number is even or odd using the
function.

The Code:

The Output:

4. Write a program in C to demonstrate the use of &(address of) and *(value at


address) operator.

The Code:
The Output:
5. Write a program in C to find the maximum number between two numbers
using a pointer

The code:

The Code:

6. Write a program in C to print the elements of an array in reverse order.


The code:

The Output:
7. Write a program in C to sort an array using Pointer.

The Code:

The Output:

8. Write a program in C to count the number of vowels and consonants in a


string using a pointer.
The Code:

The Output:

9. Write a program in C to find the largest element using calloc().

The Code:
The Output:

10. WAP to convert Binary to Octal using function


The Code:

The Output:

You might also like