SCDL - C Programming
SCDL - C Programming
Page 1 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question scanf is used to display the output
Correct Answer False
Your Answer False
True/False
Question The keywords are also called as 'Reserved Keywords'
Correct Answer True
Your Answer True
Page 2 of 64
SCDL – 3rd Semester – C - Programming
Page 3 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question Multiple conditions cannot be specified with 'for' loop
Correct Answer False
Your Answer False
Page 4 of 64
SCDL – 3rd Semester – C - Programming
Page 5 of 64
SCDL – 3rd Semester – C - Programming
Correct Answer =
Your Answer =
Correct Answer The same data type placed next to each other in memory
Your Answer The same data type placed next to each other in memory
Page 6 of 64
SCDL – 3rd Semester – C - Programming
Page 7 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question strncpy() copier first n character of one string into anoter.
True/False
Question Infinite loop is the loop which stops when the condtions is false.
True/False
Question Comments cannot be nested.
Page 8 of 64
SCDL – 3rd Semester – C - Programming
Page 9 of 64
SCDL – 3rd Semester – C - Programming
Page 10 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question There are basically 5 types of instructions in C
Correct Answer {}
Your Answer ()
Correct Answer ||
Your Answer ||
True/False
Question When array is declared with rows and columns it is called as 2-D i.e. two dimensional array
Page 11 of 64
SCDL – 3rd Semester – C - Programming
Page 12 of 64
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 13 of 64
SCDL – 3rd Semester – C - Programming
Page 14 of 64
SCDL – 3rd Semester – C - Programming
Page 15 of 64
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 16 of 64
SCDL – 3rd Semester – C - Programming
Page 17 of 64
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 18 of 64
SCDL – 3rd Semester – C - Programming
Page 19 of 64
SCDL – 3rd Semester – C - Programming
Page 20 of 64
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 21 of 64
SCDL – 3rd Semester – C - Programming
Page 22 of 64
SCDL – 3rd Semester – C - Programming
Correct Answer 6
True/False
Question Continue statement is used to exit from the current loop and to continue with the next
immediate statement after the loop.
Correct Answer False
Page 23 of 64
SCDL – 3rd Semester – C - Programming
Page 24 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question In an array of structures all elements of the array are stored in adjacent memory
locations.
Correct Answer True
True/False
Question Continue statement is used to exit from the current loop and to continue with the next
immediate statement after the loop.
Correct Answer False
Page 25 of 64
SCDL – 3rd Semester – C - Programming
Page 26 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question Control instructions are used to control the sequence of execution of various statements
in program
Correct Answer True
Your Answer Size of the array is not defined , Logical error of non-initialisation of the variable I
True/False
Question The use case may begin with no precondition or with some preconditions.
Page 27 of 64
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 28 of 64
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 29 of 64
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 30 of 64
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 31 of 64
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 32 of 64
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 33 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question Only one comment can be given in a C program
Correct Answer False
Page 34 of 64
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 35 of 64
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 36 of 64
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 37 of 64
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 38 of 64
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 39 of 64
SCDL – 3rd Semester – C - Programming
True/False
Question Logical operators cannot be used with 'do' loop.
Correct Answer False
Page 40 of 64
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 41 of 64
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 42 of 64
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 43 of 64
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 44 of 64
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 45 of 64
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 46 of 64
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 47 of 64
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 48 of 64
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 49 of 64
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 50 of 64
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 51 of 64
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 52 of 64
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 53 of 64
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 54 of 64
SCDL – 3rd Semester – C - Programming
Page 55 of 64
SCDL – 3rd Semester – C - Programming
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 56 of 64
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 57 of 64
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 58 of 64
SCDL – 3rd Semester – C - Programming
Page 59 of 64
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 60 of 64
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 61 of 64
SCDL – 3rd Semester – C - Programming
Page 62 of 64
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 63 of 64
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 64 of 64