SW 19 SAP Labs Technical Practice paper Questions and Answers- University of South Alabama
3 views 0 purchase
Course
SW 19
Institution
SW 19
SW 19 SAP Labs Technical Practice paper Questions and Answers- University of South Alabama/SW 19 SAP Labs Technical Practice paper Questions and Answers- University of South Alabama/SW 19 SAP Labs Technical Practice paper Questions and Answers- University of South Alabama/SW 19 SAP Labs Technical P...
struct myStruct
{
int a;
char b;
}
*ptr;
int main()
{
struct myStruct ms={400,A};
printf(%d %d,ptr->a,ptr->b);
return 0;
}
a) 400 A
b) 400 65
c) 400 97
d) 0 0
ANS: d
Q2. Which is a boolean operator for logical-and?
a) &
b) &&
c) |
d) |&
Q3. What is the purpose of NOT NULL constraint?
a) allows NULL values in table
b) allow to pass NULL values in column
c) does not allow NULL values in table
, d) does not allow NULL values in column
Q4. Point out the error if any in the while loop.
main()
{
int i =0;
while()
{
printf(%d,i++);
if(i>10)
break;
}
}
a) the condition in the while loop is a must
b) the while lop must be replaced by a for loop
ANS: a
Q5. What is the output of the following program?
void main()
{
int a, *pa, &ra;
pa = &a;
ra = a;
cout «a=«a «*pa=«*pa «ra«ra ;
}
a) ra
b) ra ra ra
c) Compiler error
d) None of these
,Q6. Out of the following which is a correct comment?
a) */ Comments */
b) ** Comment **
c) /* Comment */
d) { Comment }
Q7. What will be the output of the program if the array begins at 65486 and
each integer occupies 2 bytes?
int main()
{
int arr[] = {12, 14, 15, 23, 45};
printf(%u, %u , arr+1, &arr+1);
return 0;
}
a) 12, 65490
b) 14, 65492
c) 65488, 65496
d) 64490, 65498
ANS: c
Q8. What is the command to delete an index?
a) DROP index empno.empid
b) DELETE index empno.empid
c) REMOVE index empno.empid
d) None of the above
Q9. What is the terminator that is used to terminate C++ code?
, a) . (dot)
b) ; (semi-colon)
c) : (colon)
d) (single quote)
Q10. What will be the output of the program?
#include
int main()
{
int i=3, j=4, k, l;
k = addmult(i, j);
l = addmult(i, j);
printf(%d %d , k, l);
return 0;
}
int addmult(int ii, int jj);
{
int kk, ll;
kk = ii + jj;
ll = ii * jj;
return (kk, ll);
}
a) Function addmult()return 7 and 12
b) No output
c) Error: Compile error
d) None of above
ANS: c
Q11. If int is 2 bytes wide, what will be the output of the program?
#include
void fun(char**);
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Timeless2024. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $18.99. You're not tied to anything after your purchase.