Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C PROGRAM QUESTIONS : PART 1

The first expression in a for loop is

Step value of loop
Value of the counter variable
Any of above
None of above
SHOW ANSWER

Break statement is used for

Quit a program
Quit the current iteration
Both of above
None of above
SHOW ANSWER

Continue statement used for

To continue to the next line of code
To stop the current iteration and begin the next iteration from the beginning
To handle run time error
None of above
SHOW ANSWER

What will be output of
#include
void main()
{
char test =`S`;
printf("\n%c",test);
}

S
Error
Garbage value
None of above
SHOW ANSWER

Due to variable scope in c

Variables created in a function cannot be used another function
Variables created in a function can be used in another function
Variables created in a function can only be used in the main function
None of above
SHOW ANSWER

What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}

error
0
10
Garbage value
SHOW ANSWER

Difference between calloc() and malloc()

calloc() takes a single argument while malloc() needs two arguments
malloc() takes a single argument while calloc() needs two arguments
malloc() initializes the allocated memory to ZERO
calloc() initializes the allocated memory to NULL
SHOW ANSWER

Exit() is same as return

TRUE
FALSE
SHOW ANSWER

calloc() belongs to which library

stdlib.h
malloc.h
calloc.h
None of above
SHOW ANSWER

If include files can be nested

Yes
No
SHOW ANSWER

Which of the following below is/are valid C keywords

integer
int
null
none of above
SHOW ANSWER

total number of keywords in C are

30
32
48
132
SHOW ANSWER

What is use of \r in c

used to insert a vertical tab
used to insert a tab
places cursor at the end of line
places cursor at the start of line
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in