Showing posts with label C language question. Show all posts
Showing posts with label C language question. Show all posts

Wednesday 5 July 2023

Web Designing and Publishing Through 'C' Language Set 2 | NIELIT O Level

Solved :  Web Designing and Publishing Through 'C' Language Set 2 | NIELIT O Level

1. Which of the following is a correct CSS Syntax ?
(A) {body; color:orange;} (B) {body: color=orange;}
(C) body:color=orange; (D) body{color:orange;}

Sunday 2 July 2023

Web Designing and Publishing Through 'C' Language Set 1 | NIELIT O Level

 Solved Web Designing and Publishing Through 'C' Language Set 1 | NIELIT O Level

1. “w3-border-0” is a border property for w3.css, which of the following is true ?
(A) It has rounded borders
(B) removes all borders
(C) removes rounded borders only
(D) None of these

2. “w3-row-padding” is a class which defines :
(A) Container for responsive classes, with 8px left and right padding
(B) Container for responsive classes with no padding
(C) Container for responsive classes with padding
(D) None of these

Tuesday 23 May 2023

Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2022 | NIELIT O Level

 PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2022 | NIELIT O Level

Q. 1 : Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the "OMR" answer sheet supplied with the question paper, following instructions therein.
(1x10)

Tuesday 25 April 2023

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July 2021 | NIELIT O Level

 Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July 2021 | NIELIT O Level

1. Multiple Choice 


1.1 : A
1.2 : A
1.3 : B
1.4 : C
1.5 : C
1.6 : B
1.7 : A
1.8 : D
1.9 : C
1.10 : A

Sunday 23 April 2023

Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July 2021 | NIELIT O Level

 Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July 2021 | NIELIT O Level

Q. 1 : Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)


1.1 : The default storage class of a 'C' variable is :
(A) Auto
(B) Static
(C) Extern
(D) Register

Saturday 23 October 2021

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

1: Multiple Choice


1.1 : A
1.2 : C
1.3 : A
1.4 : A
1.5 : B
1.6 : A
1.7 : C
1.8 : No option given (Because  compile error in code )
1.9 : B
1.10 : C

Saturday 16 October 2021

Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

 Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the "OMR" answer sheet supplied with the question paper, following instructions therein.


1.1 Which of the following is not a valid variable name declaration ?
(A) int
(B) abc_int
(C) abc
(D) abc_abc 

Friday 30 April 2021

Implicit and Explicit type conversion | C Language

 Implicit and Explicit type conversion | C Language

Converting one data type into another data type is known as type conversion or typecasting. For example, converting character to number type integer. A waterfall model has been used for type conversion, which guaranteed that no loss of data while conversion.  If you convert the higher data type to a lower data type then data loss will occur, for example, conversion of long to an integer.

Implicit and Explicit type conversion | C Language




Implicit Typecasting

Implicit type casting means conversion of data types without losing its original meaning. This type of typecasting is essential when you want to change data types without changing the significance of the values stored inside the variable.

 

Tuesday 27 April 2021

Advantage of Pointer | C Language

Advantage of Pointer

  • It provides dynamic programming environment.
  • Physical location of memory can be direct access through pointer.
  • It allow to call by reference to function which help to achieved many dynamic operation.
  • Dynamic memory allocation is achieved through array.
  • Fire read write operations are achieved through pointer.
  • Management of structures which are allocated memory dynamically is efficiently achieved by pointer.

Sunday 25 April 2021

File read write function | C Language

1. ftell()

Returns the current file pointer position in numeric form. 

 Declarationlong ftell(FILE *stream);

 

 Remarks:

ftell returns the current file pointer for stream.If the file is binary, the offset is measured in bytes from the beginning of

the file The value returned by ftell can be used in a subsequent call to fseek.

 

 Return Value:

   On success, returns the current file pointer position.

   On error, returns -1L and sets errno to a positive value.

 

Example

 

    #include <stdio.h>

 

int main(void)

{

   FILE *stream;

 

   stream = fopen("MYFILE.TXT", "w+");

   fprintf(stream, "This is a test");

   printf("The file pointer is at byte %ld\n", ftell(stream));

   fclose(stream);

   return 0;

}

2. rewind()

Repositions file pointer to stream's beginning

 

 Syntax:

  void rewind(FILE *stream);

 

 Remarks:

rewind(stream) is equivalent to   fseek(stream, 0L, SEEK_SET) 

except that rewind clears the end-of-file and error indicators, while fseek

only clears the end-of-file indicator. 

After rewind, the next operation on an update file can be either input or

output.

 

Example

 

 #include <stdio.h>

 #include <dir.h>

 

 int main(void)

 {

    FILE *fp;

    char *fname = "TXXXXXX", *newname, first;

 

    newname = mktemp(fname);

    fp = fopen(newname,"w+");

    fprintf(fp,"abcdefghijklmnopqrstuvwxyz");

    rewind(fp);

    fscanf(fp,"%c",&first);

    printf("The first character is: %c\n",first);

    fclose(fp);

    remove(newname);

 

    return 0;

}

 

Next Topic

Thursday 22 April 2021

Memory Allocation Function

 

1. Malloc

Full form of malloc function is memory allocate. malloc allocates a block of size bytes from the memory heap. It allows a program to allocate memory explicitly as it's needed, and in the exact amounts needed.

Sunday 18 April 2021

Array an introduction | C Language

 


Array

An array is a collection of similar data type which occupies continuous location on memory. Array is useful bulk process is required on similar data type. Name of array is a constant pointer which point first element of array. Elements of array are access through index number. Index donates numeric position of data in an array. Index start with zero and last element less than one from the specified size of array.

Syntaxt :

Data_type arr_name[size_int]


 

 

Tuesday 13 April 2021

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2020 | NIELIT O Level

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2020 | NIELIT O Level

1. Objective Answer

1.1 : B
1.2 : D
1.3 : C
1.4 : B
1.5 : B
1.6 : C
1.7 : C
1.8 : C
1.9 : C
1.10 : B

Sunday 7 February 2021

Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2020 | NIELIT O Level


Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , Jan 20

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein.

1.1 : What is the following is invalid header file in C ?
         (A) math.h (B) mathio.h
         (C) string.h (D) ctype.h

Sunday 3 January 2021

2d Matrix sum using array | C Language | Nielit O Level Question

 Q : write a program to sum 3x3 matrix using an array.


2d matrix sum using array


Solution : 

#include<stdio.h>

#include<conio.h>