July 5, 2021 in C and CPP
What is a pointer in ‘C’?
a) What is a pointer in ‘C’? How is a pointer variable declared? Give examples and explain.
Enumerate the utility of pointer variables.
July 5, 2021 in C and CPP
a) What is a pointer in ‘C’? How is a pointer variable declared? Give examples and explain.
Enumerate the utility of pointer variables.
July 5, 2021 in C and CPP
c) Write a ‘C’ program that will enter a line of text, store in an array and then display
backwards. The length of the line should be undefined, (being terminated by ENTER
key), but less than 80 characters.
July 5, 2021 in C and CPP
b) What are subscripts? How are they specified? What restrictions apply to the values that
can be assigned to subscripts in ‘C’ language?
July 5, 2021 in C and CPP
a) Define an array. How are arrays processed in ‘C’? Illustrate by taking two-dimensional
arrays as examples.
July 5, 2021 in C and CPP
c) Identify all the compound statements which appear in the following program segment:
{
sum=0;
do {
scanf(“%d”, &i);
if (i < 0)
{
i=-i;
++flag;
}
sum += i;
} while (i != 0);
}
July 5, 2021 in C and CPP
a) Write and explain the action of WHILE statement. Develop a program in ‘C’ language to
compute the average of every third integer number lying between 1 and 100. Include
appropriate documentation.
b) Develop a function to calculate sum of n even integers starting from a given even
integer.
July 5, 2021 in C and CPP
c) It is said that ‘C’ is a middle level assembly language. Mention those features of ‘C’
which enable this description.
July 5, 2021 in C and CPP
b) What is an execution error? Differentiate it from syntactic error. Give examples.
July 5, 2021 in C and CPP
a) What is structured programming? Explain and give examples of relevant constructs
using pseudo-code. Highlight the advantages and disadvantages of structured
programming.
July 5, 2021 in C and CPP
A. Macro B. One or zero C. Randomly
D. External E. Max F. True
G. String H. Automatic I. Extern
J. Register K. Dynamic L. SWITCH
M. Word Not Available N. EOF O. Arbitrary
P. typeDef
4.1 An external variable definition must not begin with storage class specifier ________.
4.2 A register variable is expected to be placed in the machine ________.
4.3 For ________ and static variables, initialisers must be constant expressions.
4.4 When a function calls itself, each invocation gets a fresh set of ________ variables,
independent of the previous invocation.
4.5 #define statement calls for simplest type of ________ substitution.
4.6 The function lseek provide a way to read or write a file in ________ order.
4.7 printf(“%.*s”, max, s) can be used to print at most ________ characters from a strings.
4.8 FILE is defined with a(n) ________ statement.
4.9 The process of allocating memory at run time is known as ________.
4.10 The function getchar( ) returns ________ when there is no more input character.