Sunday 13 August 2017
Jquery HTML Tag Select
Jquery Name Selector
Roll | Name | Subject | |
---|---|---|---|
101 | Sona | Hindi | |
102 | Mona | Art | |
103 | Sita | Maths | |
104 | Anita | English | |
105 | Babita | Hindi |
Code :
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.
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 :
IDENT_CURRENT SQL Server
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
Prime number in given range
Q : Write a program to display all the prime numbers between two positive integers m and n. The values of m and n are to be taken from the user.
Solution :
Thursday 10 August 2017
Jquery ID Selector
Wednesday 9 August 2017
Jquery class selector
Tuesday 8 August 2017
2d Array Compare
Q : Write a function that returns 1 if the two matrices passed to it as argument are equal and 0
otherwise.
Solution :
Jquery Page Scroller
Page scroller make your web page design more attractive and formal because when a user want see other part of your page, then he/she need to scroll page up or down using scroll bar or mouse wheel which was accepted before of jquery. Now if we have jquery then why we used traditional page design.So scroller you page using jquery.
Scroll to Top of window
Scroll to selected area of web page
Monday 7 August 2017
Average Age Calculation with dynamic structure array
Q : Write a program which asks the user to enter the name and age of persons in his group. The numbers of persons is not known to the user in the beginning of the program. The user keeps on entering the data till the user enters the age as zero. The program finally prints the average
age.
Solution :
Friday 4 August 2017
* Operator Pointer
- First make a pointer variable
- Assign address of variable to pointer
- Access variable data though * operator
Sum of series
Thursday 3 August 2017
Multiplication Table
Flow Chart Factorial Number
SQL Server output parameter
Output Parameter
Input parameter
Output Parameter
Advantage
- Decrease complexity because it help you to do more than one task in single procedure
- when inserting data to a table and you need to get the identity value back
- when perfoming select statements and you need some extra data,
- when updating or inserting data and you need some way to know if the operation was successful
- for most if not all of the reasons you need out or ref parameters in c#
Store Procedure
C# Code
UserModel ob = new
UserModel();
try
{
using
(SqlConnection dbCon = new
SqlConnection(ConfigurationManager.ConnectionStrings["dbConnection"].ToString()))
{
using
(SqlCommand cmd = new SqlCommand("[dbo].[pcheck]",
dbCon))
{
cmd.CommandType =
CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@id",
Convert.ToInt32(id));
cmd.Parameters.Add("@phone",
SqlDbType.VarChar, 30);
cmd.Parameters["@phone"].Direction
= ParameterDirection.Output;
if
(dbCon.State == ConnectionState.Closed)
dbCon.Open();
cmd.ExecuteNonQuery();
b.MobileNo =
Convert.ToString(cmd.Parameters["@phone"].Value);
}
}
}
catch
(Exception ex)
{
}
return ob;
Wednesday 2 August 2017
Passing Array to function
Q : Write a function which accepts an array of size n containing integer values and returns average of all values. Call the function from main program.
Solution :
Write a program to bonus calculation using structure
Q : Write a C program to store the employee details with the following attribute?
Sr No.
|
Basic Salary
|
Sales Percentage
|
Bonus Amount
|
1
|
<=7000
|
<=10
|
1500
|
2
|
<=7000
|
>=10
|
3000
|
3
|
>7000 and
<=15000
|
<=10
|
2000
|
4
|
>7000 and <=15000
|
>=10
|
4000
|
5
|
>15000
|
<=10
|
2500
|
6
|
>15000
|
>=10
|
4500
|