Search Your Paper

Tuesday, September 6, 2016




S.B. Roll No……
Computer Programming and Applications
3rd Exam/ECE/6160/May’09
Duration 3 Hrs.

1.                 Choose the correct or best alternative in the following:
a.                 Literal means
i.                        A string.
ii.                        A string constant.
iii.                        A character
iv.                        An alphabet.
b.                 Choose the correct answer
i.                        Casting refers to implicit type conversion
ii.                        Coercion refers to implicit type conversion.
iii.                        Casting means coercion.
iv.                        Coercion refers to explicit type conversion.
c.                  Printf(“%d”, printf (“tm”));
i.                        Results in a syntax error
ii.                        Outputs time
iii.                        Outputs garbage
iv.                        Outputs tim and terminates abruptly
d.                 Output of the following program fragment is

X=5
Y= x++
Printf (“%d%d”; x, y)

i.                        5,6
ii.                        5,5
iii.                        6,5
iv.                        6,6
e.                  The value of an automatic variable that is declared but not initialized will be
i.                        0
ii.                        -1
iii.                        Unpredictable
iv.                        None of these

f.                   Consider the following program main()
{ float a=0.5, b=0.7;
If (b < 0.8)
If (a<0.5) printf(“ABCD”);
Else printf(“PQR”);
Else printf(“JKLF”);
}

The output is

i.                        ABCD
ii.                        PQR
iii.                        JKLF
iv.                        None of these
g.                 The following program fragment
Int *a;
*a=7;

i.                        Assigns 7 to a
ii.                        Results in compilation error
iii.                        Assigns address of a as 7
iv.                        Segmentation fault
h.                 A pointer variable can be
i.                        Passed to a function.
ii.                        Changed within function
iii.                        Returned by a function.
iv.                        Assigned an integer value
i.                   The 4-bit binary number 0111 represents
i.                        15
ii.                        -7
iii.                        7
iv.                        -1
j.                   A byte corresponds to
i.                        4 bits
ii.                        8bits
iii.                        16 bits
iv.                        32 bits

Section –B

Note : Attempt any five parts. Each question carries 6 marks

2.  Write a C program that reads a fixed point real number in a character array and then displays right most digit of the integral part of number.

3.                 Output the number x =56.1624 under the following format specification
a.                 Printf(“%7.2f”,x)
b.                  Printf(“%f”,x)
c.                  Printf(“%8.2f”,x)
d.                 Printf(“%e”,x)

4.                 Write a C program that uses ‘for’ construct to find the sum of the following harmonic series for a given value of n and display the sum.

1+1/2+1/3+……+1/n

5.                 Write a C program fragment using do…. While” construct to print out even numbers between 10 to 100 making sure that two number are written per line.

6.                 Given an integer, write a C program that displays the number as follows
First line     : all digits of integer
Second line : all except first right most digit
Third line : all except two light most digits

List line : left most digit
7.                 Describe the output of the following C program fragment
Main ()
{ int k =0, x=0;
While (k<25)
{ if (k%5==0)
{ x+=k;
Print f(“%d *,”x)
}
++k;
{
Printf(“/n jd “x+k,);
}

Section –C

Note : Attempt any three questions

8.                   

a.                 Write a C program to compute the balue of sin function. The loop must terminate when the absolute
Value of the term is less than 0.00001
Sin x=x-x3/3!+x5!-x7/7!+….
b.                 Write a switch statement that will examine the value of an integer variable flag and print the following messages;
It is hot weather; if flag has value 1
It is a stormy weather, if flag has value 2
It is sticky weather; if flag has value 3
It is a pleasant weather, otherwise

9.                   

a.                 Define a structure name student containing two fields ‘name’ and ‘marks’
b.                 Declare an array of structure having 50 elements of student type.
c.                  Write an input statement for inputting the marks and the names of 50 students defined as above.
d.                 Write a complete C program to compute and print the names of those students who have got more than 80 marks. Also print their marks along with their names.

10.              

a.                 Write a recursive function in C to compute the value of x where n is a positive integer and x has a real value.
b.                 Write a function ‘exchange’ to interchange the values of two variables say x and y. illustrate the use of this function in calling program. Assume that x and y are defined as global variables.

11.              

a.                 Write a C function that returns 1 if the arguments is a prime number is a prime number and returns 0 otherwise.


b.                 Write  a C function for searching an elements in an array of size N. Assume that elements in array are stored in ascending order.

0 comments:

Post a Comment

North India Campus

Popular

Archive

North India Campus. Powered by Blogger.

Welcome to North India Campus

Search Question Paper

Labels

1st & 2nd Semester BE 1st Semester B.Com 1st Semester BBA 1st Semester BCA (D) 1st Semester Bsc. IT (D) 1st Semester Bsc. IT 1 1ST Semester M.SC IT(D) 1st Semester M.Tech 1ST Semester MBA 1st Semester MCA 1st Semester MCA (D) 2nd Sem B.Com 2nd Sem BB 2nd Sem BBA 2nd Sem BCA 2nd Sem BCA (D) 2nd Sem BSC IT(D) 2nd Sem BSC(IT) 2nd Semester MBA A Foundation Course in Human Values and Professional Ethics Accounting and Financial Management Accounting and Financial Managementm ACCOUNTING FOR MANAGEMENT Adolescence and Family Education B.Ed (2012) Adolescence And Family Education B.Ed (Dec 2013) Adolescence And Family Education B.Ed (Dec 2014) ADVANCE SOFTWARE ENGINEERING Advanced Accounting 2 ADVANCED COMMUNICATION SYSTEMS ADVANCED MATHEMATICS FOR ENGINEERS Aligarh Muslim University Applied Physics 1 B.Ed (Dec 2008) B.Ed (Dec 2009) B.Ed (Dec 2011) B.Ed (Dec 2012) B.Ed (Dec 2013) B.Ed (Dec 2014) B.Ed (June 2008) B.Ed (June 2009) B.Ed (June 2015) BA 1 Syllabus Bachelor in Science Fashion and Technology Basic Accounting Basic Chemistry Basic Electrical Engineering Basic Electronics Basic Mathematics BSC 1 Basoc Accounting BBA 1 BBA 2 BCA Question Papers BCA Syllabus 1 Bridge Course in Mathematics Bsc.IT Business Communication-1 Business Communication-2 Business Communication-I 2 Business Environment 2 Business Laws 1 Business Mathematics Business Organisation and Management Business Statistics 2 C C Programming C Programming Bsc IT 1 C Programming Lecture Videos CADM 1st Semester Communication 2 Communication and Soft Skills Communication Skills Communication Skills 1 Communicative English Computer and Education B.Ed (Dec 2011) Computer and Education B.Ed (Dec 2012) Computer Applications Computer Fundamental Computer Graphics Video Lecture Computer in Education B.Ed (Dec 2008) Computer in Education B.Ed (Dec 2009) Computer In Education B.Ed (Dec 2013) Computer in Education B.Ed (Dec 2014) Computer Mathematical Foundation MCA D Computer Networks 1st Semester Computer Operating System Computer Organization and Assembly Language Computer System Architecture 2 Corporate Accounting Curriculum and Instruction B.Ed (Dec 2009) Curriculum and Instruction B.Ed (Dec 2011) Curriculum and Instruction B.Ed (Dec 2012) Curriculum and Instruction B.Ed (Dec 2013) Curriculum and Instruction B.Ed (Dec 2014) Curriculuman and Instruction B.Ed (Dec 2008) DATA COMMUNICATION NETWORK Data Structure 2 Data Structures 2 data structures 2 BCA D Data Structures Through C 2 Database Management with Microsoft Access Bsc IT 1 Delhi University News Desktop Publishing Tools 2 Digital Circuits and Logic Design 2 Digital Circuits and Logic Design 2 BCA D Digital Electronics 2 Digital Electronics Fundamentals 2 Distance Education B.Ed (Dec 2008) Distance Education B.Ed (Dec 2009) Distance Education B.Ed (Dec 2011) Distance Education B.Ed (Dec 2012) Distance Education B.Ed (Dec 2013) Distance Education B.Ed (Dec 2014) Dot Net Interview Questions & Answers. Education and Evaluation B.Ed (Dec 2009) Education and Society B.Ed (Dec 2008) Education and Society B.Ed (Dec 2009) Education and Society B.Ed (Dec 2011) Education and Society B.Ed (Dec 2012) Education and Society B.Ed (Dec 2013) Education and Society B.Ed (Dec 2014) Education Technology B.Ed (Dec 2009) Educational Evaluation B.Ed (Dec 2008) Educational Evaluation B.Ed (Dec 2011) Educational Evaluation B.Ed (Dec 2012) Educational Evaluation B.Ed (Dec 2013) Educational Evaluation B.Ed (Dec 2014) Educational Technology B.Ed (Dec 2008) Educational Technology B.Ed (Dec 2011) Educational Technology B.Ed (Dec 2012) Educational Technology B.Ed (Dec 2013) ELECTRONICS SYSTEM DESIGN Engineering Drawing and Graphics Engineering Mathematics Engineering Question Paper set 1 Engineering Syllabus English and Communication Skills English and Communication Skills 2 Environmental Science 2 Finaicial Accounting Financial Accounting Financial Management 2 Sem Fundamentals of Information Technology Bsc 1 Guidance and Counseling B.Ed (Dec 2008) Guidance and counseling B.Ed (Dec 2009) Guidance and Counseling B.Ed (Dec 2011) Guidance and Counseling B.Ed (Dec 2012) Guidance and Counseling B.Ed (Dec 2013) HIV and Aids Education B.Ed (Dec 2011) HIV and Aids Education B.Ed (Dec 2012) HIV and Aids Education B.Ed (Dec 2013) Hotel Management and Air Lines Syllabus HP University News Human Resource Management Human Resource Management 2 Information Management Information Technology for Management Intoduction to microprocessor 2 BCA D Introduction of Computers BBA1 Introduction to Computers 2 Introduction to I.T MCA D Introduction to Information Technology Introduction to Information Technology(BCA) Kurukshetra University News Lecture 20 Clipping -- Lines And Polygons Macro Economics 2 Management Syllabus Managerial Economics Marketing Management 2 Master Of Technology M-Tech Syllabus MBA Papers MCA Notes MCA Question Papers Mercantile Law 2 Metal Cutting Question Paper Metal Forming Question Paper Micro Economics Network Security NEURAL NETWORKS & FUZZY LOGIC Object Oriented Programming in C++ Object Oriented Programming in Cpp OOP CPP 2 Operating system (BCA) Operating System Bsc IT 1 Organisational Behaviour Organization Behaviour 2 Other Universities Others Panjab University News PCM 2 BCA D PGDCA Pharmacy Syllabus Principles and Practices of Management principles of management 2 Production and Operations Management 2 Programming in C Programming in C MCA D Programming Logic Development with C Psychology of Learning and Development B.Ed (Dec 2013) Psychology of Learning and Development B.Ed (Dec 2008) Psychology of Learning and Development B.Ed (Dec 2009) Psychology of Learning and Development B.Ed (Dec 2011) Psychology of Learning and Development B.Ed (Dec 2012) PTU Affiliated Colleges of Integerated College PTU Affiliated Colleges of Management College PTU Affiliated Colleges of Architecture PTU Affiliated Colleges of Engineering PTU Affiliated Colleges of Pharmacy College PTU Forms Download PTU News and Events Quantitative Techniques RDBMS 2 RDBMS-I 2 Relational Database Management System Research Methodology 2 SAD 2 BCA D Syllabus of Computer Applications Syllabus of Journalism and Mass Communication Syllabus of Medical Laboratory Science System Analysis and Design System Analysis and Design 2 System Analysis and Design MCA D Teacher and School B.Ed (Dec 2008) Teacher and School B.Ed (Dec 2009) Teacher and School B.Ed (Dec 2011) Teacher and School B.Ed (Dec 2012) Teacher and School B.Ed (Dec 2013) Teacher of English B.Ed (Dec 2009) Teaching of English B.Ed (Dec 2008) Teaching of English B.Ed (Dec 2011) Teaching of English B.Ed (Dec 2012) Teaching of English B.Ed (Dec 2013) Teaching of Mathematics B.Ed (Dec 2009) Teaching of Mathematics B.Ed (Dec 2011) Teaching of Mathematics B.Ed (Dec 2012) Teaching of Mathematics B.Ed (Dec 2013) Teaching of Science B.Ed (Dec 2008) Teaching of Science B.Ed (Dec 2009) Teaching of Science B.Ed (Dec 2011) Teaching of Science B.Ed (Dec 2012) Teaching of Science B.Ed (Dec 2013) Teaching of Social Studies B.Ed (Dec 2008) Teaching of Social Studies B.Ed (Dec 2011) Teaching of Social Studies B.Ed (Dec 2012) Teaching of Social Studiess B.Ed (Dec 2013) Teaching of Social Study B.Ed (Dec 2009) Technical Communication UGC NET Computer Science Question Paper Uttarakhand Open University Video Lecture Web Technologies 1st Semester Web Technologies 2 Welding Technology Question Paper Workshop on IT and E-Commerce 2