This action might not be possible to undo. Are you sure you want to continue?

CANCEL

OK

Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more

Download

Standard view

Full view

of .

Look up keyword

Like this

Share on social networks

13Activity

×

0 of .

Results for: No results containing your search query

P. 1

Start - Up C Programs Write a Program: 1. ToRatings:

4.67

(1)|Views: 2,520|Likes: 15Published by kavita09

This is very good document for the all list of C programms for all IT students..hope it will help them.

This is very good document for the all list of C programms for all IT students..hope it will help them.

See more

See less

https://www.scribd.com/doc/18103846/Start-Up-C-Programs-Write-a-Program-1-To

05/19/2012

text

original

Start - up C programsWrite a Program:

1.

To print "Hello, World".2.

To add two numbers and print the result.3.

To add n integers and print the result; take the value of n as user input.4.

To print the larger of two numbers.5.

To calculate the area and circumference of a circle, given the radius.6.

That deliberately makes the following mistakes:i.

Prints a floating-point number using the %d conversion.ii.

Prints an integer using the %f conversion.iii.

Prints a character using the %d conversion.7.

That converts Centigrade to Fahrenheit.a.

F = (9/5) C + 32.8.

That takes hours and minutes as input, and then outputs the total number of minutes.9.

That takes an integer as the number of minutes, and outputs the total hours and minutes.10.

To tell if the given year is a leap year. [Hint: A leap year is any year divisible by 4, unless theyear is divisible by 100, but not 400.]11.

To find the average of n numbers; take the value of n as user input.12.

To test whether a number is prime or not.

Fundamentals of CWrite a Program:

1.

To reverse a number 2.

To swap two variables without using temporary variable.3.

To swap three variables without using temporary variable.4.

To whether the given number is palindrome or not.5.

To find whether the given number is Armstrong number or not.6.

To find whether the given number is prime number or not.7.

To find given year is leap year or not.8.

To print multiplication table of a given number.9.

To find factorial of a given number.10.

To find whether given number is power of 2 or not.11.

To print Fibonacci series 0 1 1 2 3 5 8........... .12.

To find sum of digits of a given number.13.

To convert UPPER case letters to LOWER case.14.

To convert LOWER case letters to UPPER case.15.

To convert number to word. e.g. i/p : 45 o/p :forty five16.

To find whether the given number is perfect square or not.

FunctionsWrite a Program:

1.

Write a function

strrindex(s,t)

, which returns the position of the rightmost occurrence of

t

in

s

,or -1 if there is none.2.

Write a function

atof

to handle scientific notation of the form 123.45e-6.3.

Write a function

strlen(s)

which will return the length of the string

s

, or -1 if it is null string.4.

Write a function

toupper(s)

which will convert all occurrences of lowercase characters in string sto uppercase.

5.

Write a function

strcat(s1,s2)

which will append a copy of the string

s2

to the end of string

s1.

6.

Write a function

exchange(x,y)

to interchange the values of two variables x and y without usingtemporary variable.7.

Write a recursive function to find the sum of digits of a number.8.

Write a recursive function that will generate and print the first n Fibonacci numbers.9.

Write a function prime that returns 1 if its argument is a prime number and returns 0 otherwise.10.

Write a recursive function

reverse(s)

which reverses the string s in place

You've already reviewed this. Edit your review.

1 hundred reads

1 thousand reads

lubna_j2ee liked this

lubna_j2ee liked this

lubna_j2ee liked this

sandhya74 liked this

Karthik Satya liked this

Praveena Bingi liked this

akashalliswell liked this

Xas Kharm liked this

Chakra Bar Ti

BHAGWAT GITA

ch7

Policy Bazaar Material

Plsql Introduction

B.C.a.syllabus 4th Sem

how to heck yahoo password

learn yourself ms word

- Read and print without ads
- Download to keep your version
- Edit, email or read offline

C Programming

Assignment

c programming using pointers

C program for list implementation using array

C program for Binary Search Tree

simple c programs

451 Sample Questions 2

Some Important programs on Strings(in C)

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

CANCEL

OK

You've been reading!

NO, THANKS

OK

scribd