Saturday, 12 August 2017

C Language O Level January-2014 Solved Paper


1. Multiple Choice


1.1 : D
Explanation :  
Integer and float both are in arithmetic statement So integer will be promoted as float . final result will be consider as float that is why sizeof operator print 4 instead of 2.

Variable is not initialized after decoration So variable will have garbage data which most of time be a negative number. So   6-1=5

Friday, 11 August 2017

Array of structure

Q: Define a structure of student with the following fields: rollNo, name and marks. Write a program to read and store the data of at most 30 students in an array. Also display the average marks of
the students.

Solution : 


#include<stdio.h>
#define MAX 3
typedef struct Stu
{
     int roll;
     char name[20];
     int mark;
}student;

IDENT_CURRENT SQL Server

IDENT_CURRENT returns newly inserted record‘s auto increment value. So you can use this data while inserting a record it can be useful in many times. For example you want to return newly inserted record is for other task etc.


 USE [girfa]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        Raj Kumar
-- Create date: 08-Aug-2017
-- Description:   Girfa Student Help
-- =============================================
alter PROCEDURE [dbo].[adddata]

Vowel Count Switch statement

Q : using a switch statement, write a function to count the number of vowels and number of blanks
in a character array passed to it as an argument.

Solution 



#include<stdio.h>
#define MAX 20
void count(char*);