Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
C and Data Structures Unit Wise Important Questions

C and Data Structures Unit Wise Important Questions

Ratings: (0)|Views: 37 |Likes:
Published by Toaster97
C and Data Structures Unit Wise Important Questions
C and Data Structures Unit Wise Important Questions

More info:

Published by: Toaster97 on May 06, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

02/04/2014

pdf

text

original

 
C and Data Structures
Unit-Wise Important Questions
Unit I
Syllabus
Algorithm / pseudo code, flowchart, program development steps, structure of C program, A Simple Cprogram, identifiers, basic data types and sizes, Constants, variables, arithmetic,relational and logical operators, increment and decrement operators, conditionaloperator, bit-wise operators, assignment operators, expressions, type conversions,conditional expressions, precedence and order of evaluation. Input-output statements,statements and blocks, if and switch statements, loops- while, do-while and forstatements, break, continue, goto and labels, programming examplesAlgorithms,Flowcharts
1.
a.
Draw a Flowchart for the followingThe average score for 3 tests has to be greater than 80 for a candidateto qualify for the interview. Representing the conditional logic forgenerating reject letters for all candidates who do not get the requiredaverage & interview call letters for the others.
 b.Explain the basic structure of C program.
[10+6]
Basics (I/O)
2.
a.
Distinguish between getchar and scanf functions for reading strings.
 
 b.
What is the difference between signed integer and unsigned integer interms of memory and range
 3.
a.
What are the general characteristics of C?
 
 b.
Give and Explain the structure of a C program?
 c.Write a C program to print the Pascal’s triangle.
[4+4+8]
Constants, Data types and Variables
4.
Write about space requirements for variables of different data types.
. [16]5.
a.
What is the difference between signed integer and unsigned integer interms of memory and range
.
 b.
List the entire data types in C. What is the size of each of these datatypes
. [8+8]
 
6.a.What is a string constant? How do string constants differ fromcharacter constants? Do string constants represent numerical Values?
[Answer Tip]
 
 b.
Summarize the standard escape sequences in C. Describe them.
 
c.
What is a variable? How can variables be characterized? Give the rulesfor variable declaration.
 
d.
What is the purpose of type declarations? What are the components of type declaration?
[4+4+4+4]7.
a.
What are different types of integer constants? What are long integercon- stants? How do these constants differ from ordinary integerconstants? How can they be written and identified?
 
 b.
Describe two different ways that floating-point constants can bewritten in C. What special rules apply in each case?
 c.What is a character constant? How do character constants differ fromnumeric type constants? Do character constants represent numericalvalues?
[6+4+6]
Operators
8.
a.
What is meant by operator precedence? What are the relativeprecedence of the arithmetic operators?
 
 b.
What is the associatively of the arithmetic operators?
 
c.
How can the value of an expression be converted to a different datatypes? What is this called?
 
d.
What are unary operators? Explain example for each.
[4+4+4+4]9.a.Explain the following & illustrate it with an example each.
i.
Increment & Decrement operator.
 
ii.
Conditional operator.
 
iii.
Bitwise operator.
 
iv.
Assignment operator.
b.State the rules that applied while evaluating expression in automatictype conversion.
[12+4]
Loops
10.
a.
What is the purpose of break statement?
 
 b.
Suppose a break statement is included within the innermost of severalnested control statements. What happens when break statement isexecuted?
 c.Write a program to print the multiplication table up to 20 with properformat.
[4+6+6]
Programs
 
11.
a.
Write a program to determine and print the sum of the followingharmonic series for a given value of n: 1+1/2+1/3+.....+1/n.
 
 b.
What are the logical operators used in C and illustrate with examples.
[8+8]
12.
Write a C program to print the lower triangular of a given square matrix.
[16]
Unit II
Syllabus
Designing structured programs, Functions, basics, parameter passing, storage classes- extern, auto,register, static, scope rules, block structure, user defined functions, standard libraryfunctions, recursive functions, header files, C preprocessor, example c programs.Functions basics
1.
a.
What do you mean by functions? Give the structure of the functionsand explain about the arguments and their return values.
 
 b.
Write a C program that uses a function to sort an array of integers.
[8+8]2.
a.
Distinguish between the following:
 i.Actual and formal arguments.ii.Global and local variables.iii.Automatic and static variables.
 b.
Explain in detail about pass by values and pass by reference. Explainwith a sample program
[8+8]3.a.Distinguish between formal variable and actual variable.b.Distinguish between local and global variable.
c.
Distinguish between call by value and call by reference.
[4+4+8]4.
a.
What is a preprocessor directive.
 
 b.
Distinguish between function and preprocessor directive.
 
c.
What is the significance of conditional compilation.
 d.How does the undefining of a pre-defined macro done.
[4+4+4+4]
Recursion

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->