APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : S1 and S2

Year : 2018

Term : MARCH

Branch : BIOTECHNOLOGY

Scheme : 2015 Full Time

Course Code : CS 100

Page:29





PDF Text (Beta):

Output
Enter the size of the list: 5 Enter the
elements in list:
23
45
64
12
34
The sorted list in ascending order is 12 23
34 45 64b) if statement
if (testExpression)
{
// statements
}
The if statement evaluates the test expression inside the parenthesis.
If the test expression is evaluated to true (nonzero), statements inside the body of if is executed.

If the test expression is evaluated to false (0), statements inside the body of if is skipped from execution.
#include

int main()

{

int number;

// Test expression is true if number is less than 0
printf("Enter an integer:"); scanf("%d",

&number);

if (number < 0)
{ printf("You entered %d.\n", number);
} _ printf("The if statement is easy.");
return 0)
}
Output

Similar Question Papers