Important Questions for Viva CPU

Similar documents
C-LANGUAGE CURRICULAM

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS


M1-R4: Programing and Problem Solving using C (JAN 2019)

Introduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language

ONE DIMENSIONAL ARRAYS

Long Questions. 7. How does union help in storing the values? How it differs from structure?

Introduction to C++ with content from

Model Viva Questions for Programming in C lab

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

CSI33 Data Structures

Reading Assignment. Strings. K.N. King Chapter 13. K.N. King Sections 23.4, Supplementary reading. Harbison & Steele Chapter 12, 13, 14

M1-R4: Programing and Problem Solving using C (JULY 2018)

C Programming Multiple. Choice

Introduction to C Language (M3-R )

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

Multiple Choice Questions ( 1 mark)

Computers Programming Course 11. Iulian Năstac

Chapter 8 Character Arrays and Strings

Java Primer 1: Types, Classes and Operators

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

C & Data Structures syllabus

Programming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee

DETAILED SYLLABUS INTRODUCTION TO C LANGUAGE

Questions Bank. 14) State any four advantages of using flow-chart

UNIT- 3 Introduction to C++

C Refresher, Advance C, Coding Standard, Misra C Compliance & Real-time Programming

Computer Science (330)

By: Computer Education. Introduction Level One

C mini reference. 5 Binary numbers 12

Contents. Preface. Introduction. Introduction to C Programming

CprE 288 Introduction to Embedded Systems Exam 1 Review. 1

Course Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3

(A Book on Computer Education)

COP 3223 Final Review

Declaring Pointers. Declaration of pointers <type> *variable <type> *variable = initial-value Examples:

A flow chart is a graphical or symbolic representation of a process.

+2 Volume II OBJECT TECHNOLOGY OBJECTIVE QUESTIONS R.Sreenivasan SanThome HSS, Chennai-4. Chapter -1

Overview of C. Basic Data Types Constants Variables Identifiers Keywords Basic I/O

Chapter 5. Section 5.4 The Common String Library Functions. CS 50 Hathairat Rattanasook

CSCI 171 Chapter Outlines

ARRAYS(II Unit Part II)

Chapter 11 Strings and Files. Starting Out with Games & Graphics in C++ Tony Gaddis

Review of the C Programming Language for Principles of Operating Systems

Programming for Problem Solving 105A L T P Credit Major Minor Total Time

CS201- Introduction to Programming Current Quizzes

C programming basics T3-1 -

Embedded Controller Programming 2

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

QUIZ. 1. Explain the meaning of the angle brackets in the declaration of v below:

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

Programming Principles and Techniques

PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Basic Science and Humanities


Chapter 8 C Characters and Strings

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Introduction to Programming Using Java (98-388)

P.E.S. INSTITUTE OF TECHNOLOGY BANGALORE SOUTH CAMPUS 1 ST INTERNAL ASSESMENT TEST (SCEME AND SOLUTIONS)

Review of the C Programming Language

PES INSTITUTE OF TECHNOLOGY (BSC) I MCA, First IA Test, November 2015 Programming Using C (13MCA11) Solution Set Faculty: Jeny Jijo

Type Conversion. and. Statements

Data Types and Variables in C language

I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub

CS 222: Pointers and Manual Memory Management

Model Viva Questions for Programming in C lab

A complex expression to evaluate we need to reduce it to a series of simple expressions. E.g * 7 =>2+ 35 => 37. E.g.

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions.

by Pearson Education, Inc. All Rights Reserved.

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:

CS313D: ADVANCED PROGRAMMING LANGUAGE

Computers Programming Course 6. Iulian Năstac

CS 11 C track: lecture 5

CS107 Handout 08 Spring 2007 April 9, 2007 The Ins and Outs of C Arrays

COP 3223 Introduction to Programming with C - Study Union - Spring 2018

Iosif Ignat, Marius Joldoș Laboratory Guide 9. Character strings CHARACTER STRINGS

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

Visual C# Instructor s Manual Table of Contents

Scientific Programming in C IV. Pointers

Operators in C. Staff Incharge: S.Sasirekha

NORTH MAHARASHTRA UNIVERSITY, JALGAON. SYLLABUS FOR F.Y.B.Sc. COMPUTER SCIENCE (With effect from June 2012)

Q 1. Attempt any TEN of the following:

Pointers (part 1) What are pointers? EECS We have seen pointers before. scanf( %f, &inches );! 25 September 2017

A3-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH 'C' LANGUAGE

Model Answer paper Guru Ghasidas Vishwavidyalaya (Bilaspur ) B.COM(Third Semester) Examination, 2014 Fundamentals of Computers Paper Code: BC-307

To declare an array in C, a programmer specifies the type of the elements and the number of elements required by an array as follows

In Java we have the keyword null, which is the value of an uninitialized reference type

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

COP 3223 Final Review

Chapter 8: Character & String. In this chapter, you ll learn about;

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University

Transcription:

Important Questions for Viva CPU 1. List various components of a computer system. i. Input Unit ii. Output Unit iii. Central processing unit (Control Unit + Arithmetic and Logical Unit) iv. Storage Unit v. Output Unit 2. List various input devices i) Keyboard ii) Mouse iii) Joy Stick iv) Track Ball iv) Light Pen v) Scanner vi) Mic or Microphone 3. List various output devices i) Video Screen (CRT Monitor, LCD Screen, LED Screen) ii) Printer (Dot Matrix, Ink Jet, Laser Printer) iii) Speaker iv) Headphone iv) Projector 4. What is an operating system? An operating system (OS) is a collection of softwares that manages computer hardware resources and provides common services for computer programs. Operating System is considered the backbone of a computer, managing both software and hardware resources. 5. What is programming language A programming language is a computer language, programmers use to develop applications, Scripts, or other set of instructions for a computer to execute. Programming language is an artificial language used to write instructions that can be translated into machine language and then executed by a computer. 6. List different programming languages i. Machine Language (Low level Language) ii. Assembly Language iii. Higher Level Language

7. Define Hardware Hardware is best described as a device that is physically connected to the computer or something that can be physically touched 8. Define Software Software is a general term used to describe a collection of computer programs, procedures, and documentation that perform some tasks on a computer system. 9. What are different types of Softwares? i. System Software ii. Programming Software iii. Application Software 10. What is Algorithm An algorithm is a step by step solution of any problem 11. What is Flowchart Flow chart is a graphical/ pictorial representation of an algorithm 12. Explain C program development lifecycle 1. Creating the program 2. Compiling the program 3. Linking the program with functions that are needed from the C library 4. Executing the program 13. List C character set 1. Letters 2. Digits 3. Special Characters 4. White Spaces 14. List fundamental data types of C. 1. Integer 2. Floating point 3. Character 4. Void 15. Explain structure A structure is a collection of variables under a single name. These variables can be of different types, and each has a name which is used to select it from the structure. A structure is a convenient way of grouping several pieces of related information together.

16. Explain Union A union is a special data type available in C that enables you to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multi-purpose. 17. Explain various symbols used in Flowchart 18. Explain storage class specifiers in C 1) Automatic storage class 2) Register storage class 3) Static storage class 4) External storage class

19. Explain Basic structure of C program 20. List different operators used in C language 1. Arithmetic Operators 2. Relational Operators 3. Logical Operators 4. Assignment Operators 5. Increment and Decrement Operators 6. Conditional Operators 7. Bitwise Operators 8. Special Operators

21. What is operator precedence The precedence is used to determine how an expression involving more than one operator is evaluated. There are distinct levels of precedence and an operator may belong to any of these levels. The operators at higher level of precedence are evaluated first. 22. What is Operator associativity The operators of the same precedence are evaluated either from Left-to-Right or from Right-to-Left, depending on the priority (or precedence) level. This is known as the associativity property of operator. 23. Explain Implicit type conversion C automatically converts any intermediate values to the proper type so that expression can be evaluated without losing any significance. This automatic conversion is known as implicit type conversion. 24. Explain Explicit type conversion There are instances when we want to force a type conversion in a way that is different from the automatic conversion. This problem is solved by converting locally one of the variables to the higher type. 25. Explain Conditional Operator Conditional operator is a ternary operator pair? :. It is used to construct conditional expressions of the following general form: exp1?exp2:exp3 where exp1, exp2 and exp3 are expressions. First exp1 is evaluated. If it is non-zero (true), then the expression exp 2 is evaluated and becomes the value of the expression. If exp1 is false, exp3 is evaluated and its value become the value of the expression. 26. Explain goto statement C supports goto statement to branch unconditionally from one point to another in the program 27. What is an Array An array is a fixed-size sequenced collection of elements of the same data type. It is simply a grouping of like-type data. An array is used to represent a list of numbers, or a list of names. 28. What is a multidimensional array A multi-dimensional array is an array of three or more dimensions. The general form of a multidimensional array is: type array_name[s1][s2][s3] [sn] where si is the size of the i th dimension.

29. Explain strcat() The strcat function joins two strings together. It takes the following form: strcat(string1, string2); where string1 and string2 are character arrays. When the function strcat is executed, string2 is appended to string1. 30. Explain strcpy() The strcpy function works almost like a string-assignment operator which copies one string over another. It takes the following form: strcpy(string1, string2); which assigns the contents of string2 to string1. 31. Explain strncmp() It is a variation of the function strcmp. This function has three parameters in the function call as shown below: strncmp(s1,s2,n); This compares the left-most n characters of s1 to s2 and returns a) 0, if they are equal b) Negative number, if s1 sub-string is less than s2 c) Positive number, otherwise 32. Explain strstr() It is a two parameter function that can be used to locate a sub-string in a string.this takes the following form: strstr (s1, s2); strstr (s1, ABC ); The function strstr searches the string s1 to see whether the string s2 is contained in s1. If yes, the function returns the position of the first occurrence of the sub-string. Otherwise, it returns a NULL pointer. 33. List categories of functions in C Category 1: Functions with no arguments and no return values. Category 2: Functions with arguments and no return values. Category 3: Functions with arguments and one return values. Category 4: Functions with no arguments but return values. Category 5: Functions that return multiple values. 34. What is recursive function? A function that calls itself is known as recursive function and the process of calling function itself is known as recursion in C programming. While using recursion, programmers need to be careful to define an exit condition from the function, otherwise it will go in infinite loop.

35. What is pointer? A pointer is therefore, nothing but a variable that contains an address, which is a location of another variable in memory. 36. What is dynamic memory allocation? The process of allocating memory at run time is known as dynamic memory allocation 37. Explain malloc function The malloc function reserves a block of memory of specified size and returns a pointer of type void. It takes the following form: ptr = (cast-type *) malloc (byte-size); where, ptr is a pointer of type cast-type. The malloc returns a pointer of type cast-type to an area of memory with size byte-size. 38. Explain calloc function The calloc function is used for requesting memory space at run time for storing derived data types such as arrays and structures. While malloc allocates a single block of storage space, calloc allocates multiple blocks of storage, each of the same size, and then sets all bytes to zero. The general form of calloc is : ptr = (cast-type *) calloc (n, elem-size); This statement allocates contiguous space for n blocks. Each of size elem-size bytes. All bytes are initialized to zero and a pointer to the first byte of the allocated region is returned. If there is not enough space, a NULL is returned 39. Explain free function When the amount of memory is not needed anymore, you must return it to the operating system by calling the function free. 40. List various file operations. 1. Naming a file 2. Opening a file 3. Reading from a file 4. Writing data into a file 5. Closing a file