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.
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;
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
|