SCDL - C Programming
SCDL - C Programming
True/False
Question strrchr() find first occurrence of a given character in a string.
Correct Answer False
Your Answer False
True/False
Question The sequence diagram shows flow of behaviour and collaboration of objects.
Correct Answer False
Your Answer False
Page 1 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question A function can return only one value at a time.
Correct Answer True
Your Answer True
True/False
Question If file is too big, it gets loaded part by part.
Correct Answer True
Your Answer True
Page 2 of 62
SCDL – 3rd Semester – C - Programming
Page 3 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question Comments cannot be nested.
True/False
Question Input / Output instructions are used to perform the function of supplying input data to a
program and obtaining the output results from it.
Correct Answer True
True/False
Question printf is used to display the output at runtime.
Page 4 of 62
SCDL – 3rd Semester – C - Programming
Page 5 of 62
SCDL – 3rd Semester – C - Programming
Page 6 of 62
SCDL – 3rd Semester – C - Programming
Page 7 of 62
SCDL – 3rd Semester – C - Programming
Page 8 of 62
SCDL – 3rd Semester – C - Programming
Your Answer Incorrect p.roll=101 , no error but warning for suspicious pointer conversion
Correct Answer Address of the first element of the array [base address]
Your Answer Address of the first element of the array [base address]
True/False
Question C program is nothing but a combination of functions
Page 9 of 62
SCDL – 3rd Semester – C - Programming
Page 10 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question On pointer variable can be substracted from another provided both variables point to
elements of the same array.
Correct Answer True
Correct Answer execute the first statement in the block and the 2nd will get executed irrespictive of the
condition is true or false
Match The Following
Question Correct Answer
% Modulus operator
|| Logical opertor - OR
True/False
Question strncpy() copier first n character of one string into anoter.
Correct Answer --
Page 11 of 62
SCDL – 3rd Semester – C - Programming
Page 12 of 62
SCDL – 3rd Semester – C - Programming
Page 13 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question Multiple conditions cannot be specified with 'for' loop
True/False
Question There is no three dimensional array
True/False
Question The sequence diagram shows flow of behaviour and collaboration of objects.
True/False
Question The use case may begin with no precondition or with some preconditions.
Page 14 of 62
SCDL – 3rd Semester – C - Programming
Page 15 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question A state chart diagram shows method of execution on receipt of message and activities used in
the method.
Correct Answer True
Correct Answer !
True/False
Question puts() can display only one string at a time.
True/False
Question An Array is a Primary Constant
\r carriage return
\b backspace
\f form feed
Page 16 of 62
SCDL – 3rd Semester – C - Programming
Page 17 of 62
SCDL – 3rd Semester – C - Programming
Page 18 of 62
SCDL – 3rd Semester – C - Programming
Correct 26
Answer
Multiple Choice Multiple Answer
Question What will be the output main ( ) { char ch='s'; switch(ch) { case 's' : printf("%d",1);
case 'r' : printf("%d",2); case 'b' : printf("%d",3);break; default:printf("%d",4); } }
Correct 1,2,3
Answer
Multiple Choice Single Answer
Question The method for industrial development of software based on use-case-driven design is
Correct strcat
Answer
Multiple Choice Single Answer
Question A sequence diagram shows an interaction arranged in time sequence in its :-
Correct getchar
Answer
Multiple Choice Single Answer
Question Which of the following is correct statement to declare an array 'num' of integer type
for 50 values.
Correct int num[50]
Answer
Select The Blank
Question The keyword ________ is followed by an interger or a character constant.
Correct case
Answer
True/False
Question scanf is used to display the output
Correct False
Answer
True/False
Question "r" is a read mode to open a file which is a character not a string.
Correct False
Answer
Select The Blank
Question ________ is a relation operator used to compare for equal values
Correct ==
Answer
Multiple Choice Multiple Answer
Question Arguments can generally be passed to functions in the following two ways :-
Page 19 of 62
SCDL – 3rd Semester – C - Programming
Page 20 of 62
SCDL – 3rd Semester – C - Programming
Correct Answer searches a file on the disk , loading a file into memory in presense and returning NULL in
case of absent , setting up a character pointer to the first character
Your Answer searches a file on the disk , loading a file into memory in presense and returning NULL in
case of absent
True/False
Question The set of statements belongining to a function are enclosed within a pair of braces.
Correct Answer First dimension is rows, and second is column , Second dimension is compulsory
whereas first is optional
Your Answer Both dimensions rows and columns are optional
True/False
Question On pointer variable can be substracted from another provided both variables point to
elements of the same array.
Correct Answer True
Page 21 of 62
SCDL – 3rd Semester – C - Programming
Page 22 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question stricmp compares two string ingnoring a case.
True/False
Question Formal and Actual arguments cannot be same.
True/False
Question strncpy() copier first n character of one string into anoter.
Page 23 of 62
SCDL – 3rd Semester – C - Programming
Page 24 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question If the value of a formal argument is changed in the called funciton, the corresponding
changes take place in the calling funciton.
Correct Answer False
Correct Answer --
Your Answer --
True/False
Question C program is nothing but a combination of functions
Page 25 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: Primary and Secondary are the two types of constants in C.
Correct Answer: True
Your Answer: False
Page 26 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: An Array is a Primary Constant
Correct Answer: False
Your Answer: True
True/False
Question: Initialisation of the conditional variable is necessary for while loop.
Correct Answer: True
Your Answer: True
True/False
Question: If break is not used in cases, compiler gives an error.
Page 27 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: The set of statements belongining to a function are enclosed within a pair of braces.
Correct Answer: True
Your Answer: True
True/False
Question: In an array of structures all elements of the array are stored in adjacent memory locations.
Correct Answer: True
Your Answer: True
True/False
Page 28 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: Middle Level Language is the language which has both good programming efficiency and a good
machine efficiency
Correct Answer: True
Your Answer: True
Page 29 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: Once file is open it is always refered by its FILE pointer
Correct Answer: True
Your Answer: True
True/False
Question: While passing an array elements to a function by call by value we pass values of array elements to
the function
Correct Answer: True
Your Answer: True
Page 30 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question If the file is absent, fopen() returns NULL.
Correct Answer True
True/False
Question Infinite loop is the loop which stops when the condtions is false.
Correct Answer False
True/False
Question argv is an array of pointers.
Correct Answer True
True/False
Question strdup() duplicates a string.
Correct Answer True
True/False
Question C program is nothing but a combination of functions
Correct Answer True
True/False
Question When array is declared with rows and columns it is called as 2-D i.e. two dimensional array
Correct Answer True
Page 31 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question Only one comment can be given in a C program
Correct Answer False
Page 32 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question A pointer is a secondary constant.
Correct Answer True
True/False
Question A function can return only one value at a time.
Correct Answer True
Page 33 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question If the value of a formal argument is changed in the called funciton, the corresponding changes
take place in the calling funciton.
Correct Answer False
True/False
Question The sequence diagram shows flow of behaviour and collaboration of objects.
Correct Answer False
Page 34 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question The set of statements belongining to a function are enclosed within a pair of braces.
Correct Answer True
True/False
Question Standard I/O functions are nothing but stream I/O functions.
Correct Answer True
True/False
Question Functions are written to avoid rewriting the same section of code which requires oftenly.
Correct Answer True
True/False
Question In sense of time activity is longer and the action is relatively instantaneous.
Page 35 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question The interaction diagrams are not good enough if behaviour of object is conditional and gets into a
loop.
Correct Answer True
True/False
Question The value of the conditional variable should become false some time so that the loop can be
terminated.
Correct Answer True
True/False
Question scanf is used to accept the input from the user.
Correct Answer True
Page 36 of 62
SCDL – 3rd Semester – C - Programming
technology.
Test Model Stipulates test strategy, test plans, test
specifications, test results and test recovary
reports.
Stipulates test strategy, test plans, test
specifications, test results and test recovary
reports.
Analysis Object Model Presents information how object model will be
executed.
Presents information how object model will be
executed.
Use case Model Defines actors inside and outside of use case
and their behaviour.
Defines actors inside and outside of use case
and their behaviour.
True/False
Question Though the formal and actual argument names are same, they are treated as different variables.
Correct Answer True
Page 37 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question Logical operators cannot be used with 'do' loop.
Correct Answer False
Page 38 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question A structure variable can be passed to a function.
Correct Answer True
True/False
Question Middle Level Language is the language which has both good programming efficiency and a good
machine efficiency
Correct Answer True
True/False
Question stricmp compares two string ingnoring a case.
Correct Answer True
True/False
Question The use case may begin with no precondition or with some preconditions.
Correct Answer True
Page 39 of 62
SCDL – 3rd Semester – C - Programming
Correct Answer --
True/False
Question An expression is the combination of variables, constants and operators as per the syntax of the
language
Correct Answer True
True/False
Question While passing an array elements to a function by call by reference we pass addresses of array
elements to the function
Correct Answer True
True/False
Page 40 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question Array elements can not be passed to a function.
Correct Answer False
True/False
Question Control instructions are used to control the sequence of execution of various statements in
program
Correct Answer True
Page 41 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question If file is too big, it gets loaded part by part.
Correct Answer True
7. True/False
Question A function can return only one value at a time.
Correct Answer True
8. True/False
Question argv is an array of pointers.
Correct Answer True
9. True/False
Question Comments cannot be nested.
Correct Answer True
Page 42 of 62
SCDL – 3rd Semester – C - Programming
17. True/False
Question When array elements are passed to a function with call by reference, function has pointer
arguments.
Correct Answer True
19. True/False
Question A constant is a quantity that doesn't change
Correct Answer True
25. True/False
Page 43 of 62
SCDL – 3rd Semester – C - Programming
Question The interaction diagrams are not good enough if behaviour of object is conditional and gets into a
loop.
Correct Answer True
26. True/False
Question The control instructions determine the 'flow of control' in a program.
Correct Answer True
36. True/False
Question Functions are written to avoid rewriting the same section of code which requires oftenly.
Correct Answer True
Page 44 of 62
SCDL – 3rd Semester – C - Programming
3) float addition(int, float); a float function having integer and float type arguments a float function having
integer and float type arguments
4) char addition(char,char); a char function having 2 argumen ts of char type a char function having 2
arguments of char type
42. True/False
Question In collaboration diagrams, the connection between objects is shown.
Correct Answer True
45. True/False
Question Logical operator s cannot be used with 'do' loop.
Correct Answer False
Page 45 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question The value of the conditional variable should become false some time so that the loop can be
terminated.
Correct Answer True
Your Answer True
Page 46 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question An expression is the combination of variables, constants and operators as per the syntax of
the language
Correct Answer True
Your Answer True
True/False
Question While passing an array elements to a function by call by reference we pass addresses of
array elements to the function
Correct Answer True
Your Answer True
Page 47 of 62
SCDL – 3rd Semester – C - Programming
Base address Address of 1st element in an array Address of 1st element in an array
Address of the last element Always size of array - 1 Always size of array - 1
Call by value in function Passing values of array elements Passing values of array elements
Call by reference in function Passing addressess of array elements Passing addressess of array elements
True/False
Question UML supports both static modeling and dynamic modeling
Correct Answer True
Your Answer True
Page 48 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question In sense of time activity is longer and the action is relatively instantaneous.
Correct Answer True
Your Answer True
True/False
Question Structure variable appears before the '.' while accessing the individual element of a structure
Correct Answer True
Your Answer True
Page 49 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question All structure elements are stored in contiguous memory locations.
Correct Answer True
Your Answer True
True/False
Question There is no three dimensional array
Correct Answer False
Your Answer False
True/False
Question: fputc() can be used to write to a VDU.
Correct Answer: False
Your Answer: True
Page 50 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: In sequence diagrams, the connection between objects is shown.
Correct Answer: False
Your Answer: True
True/False
Question: There are basically 5 types of instructions in C
Correct Answer: False
Your Answer: False
Page 51 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: A variable is a name given to the location in memory where the constant is stored
Correct Answer: True
Your Answer: True
True/False
Question: If break is not used in cases, compiler gives an error.
Correct Answer: False
Your Answer: False
True/False
Question: Through behavior modeling we understand relationships, nature of interactions and response
between various elements of the system. The behavior model throws light on functionality, features and
outputs within the framework of conditions and constraints over a period of time.
Correct Answer: True
Your Answer: True
True/False
Question: The use case may begin with no precondition or with some preconditions.
Correct Answer: True
Your Answer: True
Page 52 of 62
SCDL – 3rd Semester – C - Programming
Page 53 of 62
SCDL – 3rd Semester – C - Programming
Question: Use case defines and describes what happens in the system in logical order. This is termed as :-
Correct Answer: System behaviour
Your Answer: System analysis
True/False
Question: scanf is used to accept the input from the user.
Correct Answer: True
Your Answer: True
addition(int,int); return an integer value which passes 2 integer arguments return an integer value which
passes 2 integer arguments
addition(); an integer function with no arguments Both arguments of float type which returns real value.
float addition(int, float); a float function having integer and float type arguments a float function having
integer and float type arguments
char addition(char,char); a char function having 2 arguments of char type a char function having 2
arguments of char type
True/False
Question: In Low Level Disk I/O functions, buffer management has to be done explicitly by the
programmer.
Correct Answer: True
Your Answer: False
True/False
Question: No pointer is possible to point a structure.
Correct Answer: False
Your Answer: False
\b backspace bakslash
Page 54 of 62
SCDL – 3rd Semester – C - Programming
\t tab tab
True/False
Question: The sequence diagram shows a task or activity sequence but do not show the relationship
between objects through the roles that play in the interaction.
Correct Answer: True
Your Answer: True
Implementation Model Converts design object model to implementation model based on reusable
component technology. Converts design object model to implementation model based on reusable
component technology.
Test Model Stipulates test strategy, test plans, test specifications, test results and test recovary reports.
Stipulates test strategy, test plans, test specifications, test results and test recovary reports.
Page 55 of 62
SCDL – 3rd Semester – C - Programming
Analysis Object Model Presents information how object model will be executed. Presents information
how object model will be executed.
Use case Model Defines actors inside and outside of use case and their behaviour. Defines actors inside
and outside of use case and their behaviour.
True/False
Question: An Integer is a Primary Constant
Correct Answer: True
Your Answer: True
True/False
Question: Only one comment can be given in a C program
Correct Answer: False
Your Answer: False
True/False
Question: If the value of a formal argument is changed in the called funciton, the corresponding changes
take place in the calling funciton.
Correct Answer: False
Your Answer: False
True/False
Question: Logical operators cannot be used with 'do' loop.
Correct Answer: False
Your Answer: False
Page 56 of 62
SCDL – 3rd Semester – C - Programming
Page 57 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: Standard I/O functions are nothing but stream I/O functions.
Correct Answer: True
Your Answer: True
True/False
Question: switch requires an integer expression.
Correct Answer: True
Your Answer: True
Page 58 of 62
SCDL – 3rd Semester – C - Programming
True/False
Question: The values of a structure varialbe cannot be assigned to another structure variable of the same
type.
Correct Answer: False
Your Answer: False
True/False
Question: When array is declared with rows and columns it is called as 2-D i.e. two dimensional array
Correct Answer: True
Your Answer: True
True/False
Question: Structure and union are primary constants
Correct Answer: False
Your Answer: False
Page 59 of 62
SCDL – 3rd Semester – C - Programming
Page 60 of 62
SCDL – 3rd Semester – C - Programming
main()
{ printf(“\n C to it that C survives”);
main();
}
Ans:=> infinite (I choose this option as the answer in the exam)
21) The three main areas where text and binary mode files are different :-
Ans:=> Handling of new lines , representation of end of file , storage of numbers.
Page 61 of 62
SCDL – 3rd Semester – C - Programming
23) When an array has both rows and columns it is called as:-
Ans:=> 2-D array , Matrix
36) Just passing the address of the ________ element of the array to a function is as good as passing the
entire array to the function.
Ans:=> Zeroth
Page 62 of 62