0% found this document useful (0 votes)
133 views1 page

Computer Programming1 - Midterm Exam

The document is a midterm exam for a computer programming and problem solving course. It contains questions about C language data types, format specifiers, and input/output. It also contains programming problems to convert Celsius to Fahrenheit, calculate the perimeter of a rectangle, and print the result of an array operation.

Uploaded by

Dominic Saga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views1 page

Computer Programming1 - Midterm Exam

The document is a midterm exam for a computer programming and problem solving course. It contains questions about C language data types, format specifiers, and input/output. It also contains programming problems to convert Celsius to Fahrenheit, calculate the perimeter of a rectangle, and print the result of an array operation.

Uploaded by

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

COMPUTER PROGRAMMING & PROBLEM SOLVING 1

Midterm Examination

I. ANSWER THE FOLLOWING (10pts each):

1. Enumerate and explain the C Language Data Types.

2. Enumerate and explain the C Language Format Specifiers.

3. Explain the C Input and Output (I/O).

II. DO THE FOLLOWING (25pts each):

1. Write a program in C that prompts the user to input a Celsius temperature and outputs
the equivalent temperature in Fahrenheit. The formula to convert the temperature is:
F = 9/5 C + 32, where F is the Fahrenheit temperature and C is the Celsius temperature.

2. Write a program in C that will compute for the Perimeter of a Rectangle.

3. Execute the following program and give the necessary result/output.

#include<stdio.h>

main()
{
int a[] = {10, 20, 30};

printf("%d", *a+1);
}

You might also like