Professional Documents
Culture Documents
DENNIS RITCHIE
Who was Creator of B Language, which inspired Dennis Ritchie to create Strong Procedural Language
called C?
KEN THOMPSON
A variable in c
must have a name starting with a character
can't have a name same as keyword
All of above
must have a valid datatype
Refers to functions or procedures that perform a specific task or set of tasks and can be called from
other parts of the program.
SUBPROGRAM SECTION
declaration refers to the declaration of a variable or function that is accessible from any part of the
program, not just from the block or function where it was declared.
GLOBAL SECTION
#include <stdio.h>
int main()
int main = 3;
printf("%d", main);
return O;
COMPILE TIME ERROR
++ is a_____ operator.
UNARY
*_________is a operator
BINARY
&& is a __________operator
LOGICAL
#include<stdio.h>
Int main()
{
double x=1.2;
int sum = (int) x + 1;
printf(“”sum= %d””, sum);
return 0;
}
SUM = 2
Which of the following decision-making statements is used to execute a block of code only if the
condition is true.
IF
When there is a need to skip the remaining code of the current iteration, which keyword is useful in
C.
CONTINUE
The keyword used to transfer control from a function back to the calling function is.
RETURN
_____ class refers to the persistence of a variable and its scope within the program, that is, the
portion of the program over which the variable is recognized.
STORAGE
The variables declared in the main() function are the global variables.
FALSE
The global variables are more secured than the automatic variables in a program.
FALSE
Does an automatic variable retain its value once control iS transferred out of its defining function?
NO
For an int array a[10], If you declare a pointer variable ip then you can set it to point to the beginning
of an array by assigning: int *ip = ………………
&a[0]
int *ptr, p;
ptr is a pointer to integer, p is not
Assign the null value is called
NULL POINTER
struct student
{
};
void main()
{
struct student s[2];
printf("%d" sizeof(s));
0 Answer
In function p is a
Pointer returned by malloc() & calloc()
Which of the following function is used for sets the position to a desired point in the file
Fseek()
Which of the following function is used for sets the position to the beginning of the file
REWIND()
Which function will return the current file position for stream
ftell()
Select a function which is used to read a single character from a file at a time?
FGETC()
What does argc and argv indicate in command-line arguments?(Assuming: int main(int argc,
char*argv[]))
argument count, argument vector
Pushing an element into stack already having five elements and stack size of 5 , then stack becomes
STACK OVERFLOW