FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download DBATU B-Tech 1st Year 2017 Dec Basic Computer Programming 2 Question Paper

Download DBATU (Dr. Babasaheb Ambedkar Technological University) B.Tech First Year 2017 Dec Basic Computer Programming 2 Question Paper

This post was last modified on 17 May 2020

This download link is referred from the post: DBATU B.Tech Last 10 Years 2010-2020 Question Papers || Dr. Babasaheb Ambedkar Technological University


A FirstRanker's Choice - FirstRanker.com

DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY

LONERE - RAIGAD - 402 103

--- Content provided by FirstRanker.com ---

Semester Examination - December - 2017

Branch: B. Tech. Semester: I

Subject with Subject Code: Basic Computer Programming Marks: 60

[ICT106]

Date: 22 /12 /2017 Time: 3 Hrs.

--- Content provided by FirstRanker.com ---

Instructions: 1] Attempt any 5 Questions.

2] Figures / structures to the right indicate full marks.

3] Each Question Carry 12 Marks.

4] Assume suitable data, if necessary.

5] Neat diagrams must be drawn wherever necessary.

--- Content provided by FirstRanker.com ---

Q. No. 1

A) i. What do curly braces denote in C? Why does it make sense to use curly braces to [2] surround the body of function?

ii. Consider the statement: double ans = 10.0 + 2.0 / 3.0 - 2.0 * 2.0; [1] Rewrite this statement, inserting parenthesis to ensure that ans = 11.0 upon evaluation of this Statement.

iii. Explain why given statement is not correct, and fix it.

#include"stdio.h"

--- Content provided by FirstRanker.com ---

B) Explain the various phases of process of programming in details. [4]

C) Convert the following Flowchart ( Start ) into C Program.

(Flowchart Description: A flowchart divided into two parts where S is branching to show continuous flow of a program. Declare the variables, Take the input in variables, YES m=c, NO Print the value of m)

FirstRanker.com

A Firstranker's choice

--- Content provided by FirstRanker.com ---

Q. No. 2

A) Write logical expressions that tests whether a given character variable in C is

i. lower case letter

ii. upper case letter

iii. digit

--- Content provided by FirstRanker.com ---

iv. whitespace (includes tab, space, newline) [4]

B) Evaluate the expression: 1 && 0 % 10 >= 0 && 30 % 10 <= 3. Show the steps of your expression evaluation. [4]

C) Write the values of the following expressions. [4]

i. ! -1

ii. 2.0 + (float)(5/3)

--- Content provided by FirstRanker.com ---

OR

With proper example explain following Bitwise Operators: [4]

i. Left Shift Operator

ii. Bitwise AND

iii. Right Shift Operator

--- Content provided by FirstRanker.com ---

iv. Bitwise Complement Operator

Q.No. 3

A) Define the variable in C. What are the rules programmer has to follow for declaration of any variable. Give an example of variable declaration and variable initialization. [4]

B) Telephone company charges its domestic consumers as follows:

No. of phone Calls - Rate of Charge

--- Content provided by FirstRanker.com ---

0-200 Rs. 0.50 per unit

201-400 Rs. 100 plus Rs.0.65 per unit excess of 200

401 and above Rs. 230 plus Rs.0.80 per unit excess of 400

Write a program that reads the customer telephone number and number of phone calls and prints the amount to be paid by the customer. [4]

OR

--- Content provided by FirstRanker.com ---

The digital root of a number is single digit number obtained by an iterative process of summing digits. Digital sum of 65536 is 7, because 6+5+5+3+6=25 and 2+5 = 7. Write a program that takes an integer as input and prints its digital root. [4]

C) Differentiate between:

i. While Loop and do.....while Loop.

ii. break and continue statement. [4]

FirstRanker.com

--- Content provided by FirstRanker.com ---

FirstRanker's Choice - FirstRanker.com

C) i. Write the syntax of switch statement. [1]

ii. What will be the output of the following program? [3]


#include <stdio.h>

--- Content provided by FirstRanker.com ---

int main(){ int i, j, k; for(i=1;i<10;i++){ printf("\n %d: ", i); for(j=1;j<10;j++){ if(i%3 == 0) break; if(i > j) continue; k=i*10+j; printf(" %d", k); } }

Q. No. 4

A) What will be printed by the following program? [3]


int f(int a){ printf("%d,", a); a++; return a;

--- Content provided by FirstRanker.com ---

}
int main(){ int a = 5, b; b = f(a); printf("%d,%d\n", a, b); return 0;
}

B) Write a program in C which take an integer number x from user. Write a function which find given number is Armstrong or not i.e. void armstrong(int n) which not return any value. Take input value x in main() function and use function call armstrong(x). In function, void armstrong(int n) display message as "Enter number is is an armstrong number" OR "Enter number is is not an armstrong number" [3]

C) i. What do you mean by recursion? [1]

--- Content provided by FirstRanker.com ---

ii. With proper example give the syntax of function call, and function definition. when programmer has to use function prototype in program. Give syntax of function prototype. [3]

iii. Explain any one Static Storage Class with a proper C code. [2]

Q. No.5

A) A teacher has to enter mark of 5 subjects of a student and has to find the average of that marks. Which data type would you suggest to programmer and write C program to take the input from programmer and find the average of entered marks. Also Display data entered by programmer and average find through program on Screen. [4]

FirstRanker.com

--- Content provided by FirstRanker.com ---

A Firstranker's choice

B)


#include<stdio.h>
void sortins(int f[],int p){ int temp, i, j; for(j =1; j < p; j++){ temp = f[j]; i=j-1; while(i >= 0 && f[i] > temp){ f[i+1] = f[i]; i--; f[i+1] = temp; } }

--- Content provided by FirstRanker.com ---

}
void main(){ int A[8] = {27,25,783,65,30,68,39,77}; sortins(A,8);
}
Write the values of [ i ] in each iteration when it is inside while loop. [3]

C) Define Array. [1]

Initialize two dimension array and show matrix representation of initialized two dimension array. [2]

--- Content provided by FirstRanker.com ---

Write C statements for one dimension array to do the following:

i. Set the value of the 5th component of the alpha array to 35.

ii. Set the value of the 9th component of the alpha array to the sum of the 6th and 13th components of the alpha array. [2]

Q. No. 6

A) Define a structure in C named 'Student’ which contains four fields as {name, age, gender, department}. Declare a variable as your name of ‘struct Student'. Assign the values for your structure as xyz, 23, Male, Computer respectively. [3]

--- Content provided by FirstRanker.com ---

B) Write a program in C to create a structure having named as Employee consists of empCode, name, department, address and salary as its members. Use array of structure to read the details for five employees from user and then display the data entered by the user on Screen. [6]

C) Date is an entity which consists of hours, minutes and seconds. Account is a second entity which consists of acct_no, acct_type('S' for saving and 'C' for current), name_of_account_holder, balance in respective acct_no, date_of_lastpayment which is already defined using Date entity. Write a syntax in C from given data and also initialize the value to every elements using dot operator. [3]



--- Content provided by FirstRanker.com ---

This download link is referred from the post: DBATU B.Tech Last 10 Years 2010-2020 Question Papers || Dr. Babasaheb Ambedkar Technological University