Monday, 24 April 2017

NIELIT O Level C Language Solve Paper July-15

NIELIT O Level C Language Solve Paper with Answer July-15

1 Objective

1.1 A
Explanation : See operator priority table 
1.2: A
1.3 : C
Explanation : Continue statement transfer control to start of loop and when condition will be wrong else stops loop So string will be printed 0 times because its after else statement.


1.4 : D
Explanation :  Read by click here
1.5 : C
Explanation : Capacity of array is 7.  As we know C language stores null character at end of a string as string terminator. one byte is used to store null character So you can save only 6 character. when you will print this string then there may be possibility to print text with garbage data because null is not in string.

1.6: D
Explanation : C language don’t have Boolean data type so true false data is detect by number as in following table
True
Positive number or 1
False
Negative number or 0

1.7: B
1.8 : B
Explanation :  structure, union and enumeration is use to define user defined data type

1.9:  A
Explanation : Space can not used in any type of identifier you can use underscore if any need of space is there.
i.e. emp_age,rest_room

1.10 : C
Explanation : A do-while loop guarantee that loop will be executed at least one time when condition is false because it’s an exit control loop condition is checked at bottom of loop body.

2 True/False

2.1 : T
2.2 : T
2.3 : T
Explanation 
struct test
{
      int roll;
      char name[10];
};
void main()
{
      struct test ob;
      printf("\n\tSize with variable %d",sizeof(ob));
      printf("\n\tSize with structure %d",sizeof(struct test));

}

2.4 : F
Explanation : Only do-while loop is post tested loop.

2.5 T
2.6  F
Explanation  : A variable is an accumulator for storage data of a program. Content of a variable can be change but variable named cannot be changed ones it has been declare. 
2.7 : T
Explanation  :
#include<stdio.h>
void show()
{
printf("\nFunction Called");
}
void main()
{
void (*ptr)();
ptr=&show;
ptr();
}

2.8 : F
Explanation  : Only static variable initialize by zero by default other wise its has an unpredicted number which is mostly negative number.

2.9 : T

Explanation  : Raima Database Manager (or RDM) is an ACID-compliant embedded database management system designed for use in embedded systems applications. RDM has been designed to utilize multi-core computers, networking (local or wide area), and on-disk or in-memory storage management. RDM provides support for multiple application programming interfaces (APIs): low-level C API, C++, and SQL(native, ODBC, JDBC, ADO.NET, and LabView). RDM is highly portable and is available on Windows, Linux, Unix and several real-time or embedded operating systems. A source-code license is also available.

2.10 F

Explanation   : Right to Left Associativity

3. Math the Column

3.1 : Four because no appropriate option has not been given.
3.2 : B
3.3 : I
3.4 : E
3.5 : G
Explanation  : Typedef renames a data type name for sake of simplicity.

3.6 : A
Explanation  : T
int (*ptr)[10] - pointer to an array of integers

int* ptr[10] - an array of int pointers

Array of pointers
pointer may be arrayed like any data type. To assign the address of an integer variable called var to third element of the pointer array, write
ptr[2] = &var;

to find the value of var, write
*ptr[2].

Pointer to array
pointer to an array is a single pointer, that hold the address of an array of variables. in above case it is an integer array.

3.7 :L

3.8 : M
Explanation  : calloc() zero-initializes the buffer, while malloc() leaves the memory uninitialized.

3.9 D
3.10 B

4. Fill in the Blank

4.1 :  G
4.2 : H
4.3 : C
4.4 : J
4.5 : I
4.6 :  E
Explanation  : 
static void test()
{
static int i=10;
printf("\n\t%d",i);
}
void main()
{
test();
}

4.7 :  E
Explanation  : 
/* show will not be called due to passing static member from static function */
static void test()
{
static int i=10;
printf("\n\t%d",i);
print(i);
}

void print(int n)
{
printf("\n\tValue of I %d",n);
}
void main()
{
test();

}

4.8 : A
4.9 : D
4.10 : J

3 comments:

  1. padna padta h blog k lia bhi 2 question k same answer de rakhe h beta padke aa phele phir blog bnaiyio

    ReplyDelete