Professional Documents
Culture Documents
1567931355
1567931355
1 C Language was developed in the year _______ 1970 1975 1980 1985
1 Which is the only function all C programs must contain? start() main() printf() getch()
1 The keywords cannot be used as variable names. TRUE FALSE
1 Which of the datatypes have size that is variable? int struct float double
1 Which of the following is a logical AND operator? ! && || &
1 C Programming was created in Year _______ . 1976 1972 1980 1967
Many features of C were derived from an earlier
1 language called _____. BASIC PASCAL FORTRAN B
How many times below for loop will be executed
?#include<stdio.h>
int main()
{
int i=0;<br/>
for(;<br/>;<br/>)
printf("%d",i);<br/>
return 0;<br/>
1} 10 times 1 times Infinite times 0 times
Find output of the following program ?
#include<stdio.h>
int main()
{
char str[] = "Smaller";<br/>
int a = 100;<br/>
printf(a > 10 ? "Greater" : "%s", str);<br/>
return 0;<br/>
1} 100 Greater Smaller Compile Error
Guess the output of the following program :
#include<stdio.h>
int main()
{
int x = 10;<br/>
float y = 10.0;<br/>
if(x == y)
printf("x and y are equal");<br/>
else
printf("x and y are not equal");<br/>
return 0;<br/> x and y are not
1 } Compile Error Run Time Error x and y are equal equal
Nesting of if-else statements is allowed in C
1 Programming. TRUE FALSE
Continue statement is allowed inside the switch case
1 statement ? TRUE FALSE
Which of the statement we need to write , in order to
1 check any condition. exit Break If Continue
2 Which of the following is an invalid if-else statement? if (if (a == 1)){} if (func1 (a)){} if (a){} if ((char) a){}
all of the
2 Which datatype can accept switch statement? Int Char Long mentioned
If the user enters 1 s 3.2, what value will be returned by
the scanf()?
2 scanf("%d %f %c", &a, &b, &c);<br/> 1 2 3 no return value
What error will be generated on using incorrect
2 specifier for the datatype being read? compile error run-time error logical error no error
2 Libray function getch() belongs to which header file? stdio.h conio.h stdlib.h stdlibio.h
Which of the following ways are correct to include
2 header file in C program? #include<stdio.h> #include"stdio.h" Both A & B None of these
int main()
{
int x = 0;<br/>
printf("%d",x);<br/>
return 0;<br/> Compilation
2} 10 0 Error Undefined
Which programming language is more faster among
2 these? Java PHP C Visual Basic
What should be the output:
void main()
{
int a = 10/3;<br/>
printf("%d",a);<br/>
2} 3.33 3.2 3 0
void main(int
argc , char **
2 Which of the following is executed by Preprocess? #include<stdio.h> return 0 argv) None of above
int main()
{
int i=10;<br/>
int j=20;<br/>
int k;<br/> k=i+j;<br/>
printf("%d",k);<br/>
return 0;<br/>
}
2 Compilation Error Runtime Error 0 30
int main()
{
int x;<br/>
x=10,20,30;<br/>
printf("%d",x);<br/>
return 0;<br/>
2} 10 20 30 Compilation Error
What is output of below program?
void main()
{
int i,j;<br/>
for(i = 0,j=0;<br/>i<5;<br/>i++)
{
printf("%d%d--",i,j);<br/>
} 00--10--20--30-- Compilation 00--01--02--03--04-
2} 0--01--12--23--34-- 40-- Error -
2 The keywords cannot be used as variable names. TRUE FALSE
What is the correct syntax to declare a function foo() void foo(struct void foo(struct void foo(struct none of the
3 which receives an array of structure in function? *var); *var[]); var); mentioned
ptr is array of ptr is a pointer to
What does the following declaration mean? pointers to 10 an array of 10 ptr is an array of ptr is an pointer
3 int (*ptr)[10];<br/> integers integers 10 integers to array
Address of the
In C, if you pass an array as an argument to a function, Value of elements First element of last element of Base address of
3 what actually gets passed? in array the array array the array
String operation such as strcat(s, t), strcmp(s, t), Presence of NULL Presence of new- Presence of any None of the
4 strcpy(s, t) and strlen(s) heavily rely upon. character line character escape sequence mentioned
What will be the value of var for the following C strcmp has void
4 statement? var = strcmp("Hello", "World");<br/> -1 0 1 return-type
The data structure used to implement recursive
4 function calls _____________ Array Linked list Binary tree Binary tree
4 The principle of stack is __________ First in first out First in last out Last in first out Last in last out
4 Which function will you choose to join two words? strcpy() strcat() strncon() memcon()
What is the default return type if it is not specified in
4 function definition? void int double short int
4 functions can return structure in c? TRUE FALSE
4 unctions can return enumeration constants in c? TRUE FALSE
It is necessary to declare the type of a function in the Returns an Returns a non- Is not defined in
4 calling program if the function integer integer value the same file None of these
Template
4 A function that uses variable types is called Overloaded Function Variable function Virtual function
call by value
4 The default parameter passing mechanism is call by value call by reference result none of above