BSCIT CA413 Introduction to Programming Past Paper PDF - January 2024

Document Details

HardWorkingSandDune

Uploaded by HardWorkingSandDune

CHARUSAT

2024

Charotar University of Science and Technology

Tags

C Programming computer science programming introduction to programming

Summary

This is a past paper for the Introduction to Programming course (CA413) offered by Charotar University of Science and Technology in January 2024. The paper contains multiple choice questions related to C programming concepts including keywords, flowcharts, functions, and arrays.

Full Transcript

Exam Date & Time: 24-Jan-2024 (01:15 PM - 04:30 PM) CHAROTAR UNIVERSITY OF SCIENCE AND TECHNOLOGY University Examination January-2024 1st Semester of Bachelor of Science in Infor...

Exam Date & Time: 24-Jan-2024 (01:15 PM - 04:30 PM) CHAROTAR UNIVERSITY OF SCIENCE AND TECHNOLOGY University Examination January-2024 1st Semester of Bachelor of Science in Information Technology (BSc.-(IT)) INTRODUCTION TO PROGRAMMING [CA413] Marks: 70 Duration: 195 mins. Section-I Answer all the questions. Section Duration: 40 mins 1 Who developed C language? (1) Steve James Gosling Dennis Ritchie Rasmus Lerdorf Jobs 2 All keywords in C are in ____________ (1) Lower Case letters Upper Case letters Camel Case letters None of the mentioned 3 What is an example of repetition in C? (1) for while do...while All of the above 4 The C-preprocessors are specified with _________ symbol. (1) void main() { int x = 5 * 9 / 3 + 9; printf("%d",x); } depends on 3.75 24 3 compiler 7 The switch expression can be integer, character or float only. (1) True False 8 Which operator is used to access the value pointed to by a pointer? (1) * & -> :: 9 __________ symbol is used to represent the process in a flowchart. (1) Rounded Rectangle Parallelogram Diamond rectangle 10 __________ will evaluate the result in integer only. (1) strcmp() strcpy() strcat() None of the given 11 A function which calls itself is called a ___ function. (1) Self Function Auto Function Recursive Function Static Function 12 __________ statement executes at least one time. (1) do...while while for None of the given 13 What is the output of following code: (1) Page #1 #include< stdio.h> int main() { int i=5; switch(i) { case 3: printf("three"); case 4: printf("four"); case 5: printf("five"); case 6: printf("six");break; case 7: printf("seven"); default: printf("default"); } } five fivesixsevendefault fivesix None of the above 14 Which of the following are not standard header files in C? (1) stdio.h stdlib.h conio.h None of the above 15.c is the extension for the C program source file. (1) True False 16 what is the extension of header file in C? (1).txt.c.h.obj 17 The execution of a program begins with main(). (1) True False 18 What are the elements present in the array of the following Ccode? (1) int arr = {5}; 5,5,5,5,5 5,0,0,0,0 5,NULL,NULL,NULL,NULL 5 19 How many keywords are there in C language? (1) 32 64 16 15 20 The C source file is processed by the _________. (1) Both Interpreter and Interpreter Compiler Assembler Compiler Section-II Answer 5 out of 8 questions. 1 Define Flowchart and explain all the symbols used in a flowchart. (5) 2 Define Switch and list down all the rules of switch statement. (5) 3 What is called Loop? Explain types of loop. (5) 4 Draw and explain structure of C program. (5) 5 Explain types of files in a C programming. (5) 6 Define Identifier. List down the rules of Identifiers. (5) 7 Write a C program to input marks of 5 subjects using an array and display total marks and (5) percentage. 8 Write a C program to find factorial of a number. (5) Section-III Answer 5 out of 8 questions. Page #2 1 Define Array. How to declare and initialize one dimensional array? (5) 2 Define string and explain a) strcat() b) strcmp() (5) 3 Explain Function declaration, calling and definition. (5) 4 Write short notes on: (5) a) Chain of pointers b) Generic pointer 5 Explain all operators available in C. (5) 6 Explain implicit and explicit type conversions with examples. (5) 7 Write a C program to enter temperature of N cities using an array and display the Highest (5) temperature, Lowest Temperature and Average Temperature. 8 Write a C program to find whether a number entered by user is Odd or Even. (5) -----End----- Page #3

Use Quizgecko on...
Browser
Browser