0% found this document useful (0 votes)
19 views13 pages

2021 2022 CAT01 Quiz

The document contains a series of programming questions related to C language, flowcharts, and software concepts. It includes tasks such as creating records, inputting data, searching for records, and understanding software types. Additionally, it covers logical operators, control structures, and proprietary license rights.

Uploaded by

krisretro1
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)
19 views13 pages

2021 2022 CAT01 Quiz

The document contains a series of programming questions related to C language, flowcharts, and software concepts. It includes tasks such as creating records, inputting data, searching for records, and understanding software types. Additionally, it covers logical operators, control structures, and proprietary license rights.

Uploaded by

krisretro1
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/ 13

Dashboard / My courses / EEX3417_2022 / CAT01 / CAT01-19-07-2022-20----20-07-2022 / Preview

Question 1

Not yet answered

Marked out of 30.00

This question has text boxes which will create a C program. Fill them with the correct answer.

1. Create a record of for the following details

2. Create array of record of length of 3


3. Input data for all records
4. Search an existing record using food_no
5. If the record found enter purchasing amount
6. If the purchasing amount is greater than the display cannot purchase.
7. Else reduce purchase amount with stock balance
=========================================
#include <stdio.h>
#include <string.h>
// Struct food

struct

};
int main()
{
//Initialize variables
int i=0; // for loop variable "i" and Initialize to zero

//Maximum number of food "max" and Initialize to 3

// Create struct food "fd" array with length of max

// search food number "f_no" and Initialize to zero


// searched food declare variable "src" and Initialize to zero

// Purchase amount declare variable "prc" and Initialize to zero

// While loop selection "sel"

// Assign "sel" to 'y'

//Input food details

for( ) // loop i=0 to max

{
printf("Food no "); // Display "food no "
// Input "food_no" of struct array "fd" in the position i
scanf("%d",&fd[i].food_no);

// Display "Food description "

// Input "food_desc" of struct array "fd" in the position i

// Display "Food price "

// Input "food_price" of struct array "fd" in the position i

// Display "Stock balance "

// Input "stock_balance" of struct array "fd" in the position i

}
//while sel is 'y'

while( )

{
//Search food
printf("---------------\n");
printf("Search food no ");

// Input f_no

for(i=0;i<max;i++)
{
// if i_no is equal to food number of the record,

if( ) // Search if i_no equal to food_no

src=i; // Assign i to src


}
// Stock balance
printf("Food %s\n",fd[src].food_desc); // Print searched food_desc
// Print searched stock balance as "Stock Balance " and go to next line

//Purchasing
printf("Enter purchase amount ");

// Input 'prc' purchased amount

if( ) // If searched food >= purchased amount

{
// stock_balance = stock_balance-prc

}
else
printf("Balance is not enough\n");
printf("Do you want to continue [y or n] ");
scanf(" %c",&sel); // Input sel
}
return 0;
}
Question 2

Not yet answered

Marked out of 20.00

This question is related to flowchart with function. Select answers from the boxes and drag to relevant boxes

return y y=xn+2 y=x*n+1 M=0 x=calc(N,A)

A=0 B=0 x=0 B=B+1 start end N=0 M=0 y=0 N!=10

A=A+1 M=1 Print x,N,M x=calc(N,B) Input number N


Question 3

Not yet answered

Marked out of 6.00

Drag and drop correct answers in correct blank boxes. This C program is to find greater value of two numbers. This program includes
a function to find greater value.
--------------------------------------------------------------------------------
#include <stdio.h>
int greater( , )

{
int result=0;
if( )

{
result=num1;
}
else
{
result=num2;
}
return ;

}
int main()
{
int nm1=0;
int nm2=0;
int = =0;

printf("Enter first number ");


scanf("%d", );

printf("Enter Second number ");


scanf("%d",&nm2);
result=greater( );

printf("Greater value is %d",result);


return 0;
}

int num1 int num2 : # result &nm1 num1>=num2 nm1,nm2

result ;
Question 4

Not yet answered

Marked out of 2.00

Every computer program performs three basic tasks in solving problems. Select these tasks in correct order
1. ,

2. ,

3.
---------------------------------------------------------------

Arithmetic operations Perform operations Store data Manipulate data Compiling

Provide results

Question 5

Not yet answered

Marked out of 4.00

Differentiate following software in system software and application software

Windows 2000

Ubuntu

codeblocks

Linux

Libraoffice calc

Adobe Premiere Pro

Microsoft word 365

System software Application software Device drivers


Question 6

Not yet answered

Marked out of 2.00

Select which category is suitable for the following statements

Check whether the format of the date is DD/MM/YYYY


Check weather the values of DD is in correct range
Check whether the date is not a holiday
Check whether the date is not exceed the manufacturer warranty period

Validation Verficiation

Question 7

Not yet answered

Marked out of 2.00

Select correct answer

Example of a textual data

Example of a numerical data

Age of a person Name of a person Recorded sound of a person Image of a person

Check whether true or false


Question 8

Not yet answered

Marked out of 2.00

Select correct function oriented design technique

structure chart sequence Structure chart‑selection Structure chart‑iteration NS chart‑iteration

NS chart‑selection

Question 9

Not yet answered

Marked out of 3.00

Find the general format of the pointer in the correct order.


Question 10

Not yet answered

Marked out of 10.00

Find the correct order of the software life cycle.

Question 11

Not yet answered

Marked out of 2.00

Find the correct order to define the given example.


(For C programming) Reserve 25 elements for character array myArray.
Question 12

Not yet answered

Marked out of 4.00

Select what types of programming languages

C Choose...

python Choose...

Java Choose...

C++ Choose...

Question 13

Not yet answered

Marked out of 1.00

Find the correct answer for given statements related to the main aspects of software development.

Are we building the product right? Choose...

Are we building the right product? Choose...

Agree on what functions the system is to perform, in consultation with the customer. Choose...

Question 14

Not yet answered

Marked out of 7.00

Write correct answers regarding the logical operators in C language

A AND B

A OR B

NOT A
Question 15

Not yet answered

Marked out of 2.00

What is the correct output of the following C program


-----------------------------------------

#include <stdio.h>
void main(void)
{
int c;
c=7;
printf("%d , ",++c);
printf("%d , ",c++);
printf("%d\n ",c);
}

----------------------------------------

8, 8, 10

8, 8, 9

7, 8, 9

7, 7, 7

Question 16

Not yet answered

Marked out of 1.00

Select the correct answer


Assembly language is a

a. Mid level language

b. High level language

c. Low level language

d. Parallel language
Question 17

Not yet answered

Marked out of 1.00

Select correct answers


Control structures in Structured programming

a. Sequence, selection, iterations

b. sequence, selection, linear

c. selection, linear, bilinear

d. parallel, linear, bilinear

Question 18

Not yet answered

Marked out of 1.00

What are not granted rights of proprietary license?


1. Right to modify

2. Right distribute

3. Copy right retained


4. Right to display

5. Right to perform

a. 4 and 5

b. 1 and 3

c. 2 and 4

d. none

e. 1 and 2

◄ Announcements

Jump to...

You might also like