In how many ways can you capture external variables in a lambda expression?
Which data type is used to represent the absence of parameters?
What will be the output of below c code -
#include<stdio.h>
void main()
{
while(1)
{
if(printf("%d",printf("zoo")))
break;
}
}
#include <stdio.h>
int main()
{
int x = 3;
if (x == 2); x = 0;
if (x == 3) x++;
else x += 2;
printf("x = %d", x);
return 0;
}
A function with the same name as the class, but preceded with a tilde character (~) is called __________ of that class.
What is the output of the following C code?
int main() {
int i, j=2, k, a;
if (i = j%2)
k = 2;
a = 2;
printf("%d %d ", k, i);
return 0;
}
Which of the following statements about sequence points is correct?
What will be the output of the following C++ code?
#include <stdio.h>
#include<iostream>
using namespace std;
int main ()
{
int array[] = {0, 2, 4, 6, 7, 5, 3};
int n, result = 0;
for (n = 0; n < 8; n++)
{
result += array[n];
}
cout << result;
return 0;
}
Consider the following ANSI C function:
int SimpleFunction(int Y[], int n, int x) { int total = Y[0], loopIndex; for (loopIndex=1; loopIndex<=n-1; loopIndex++) total=x*total +Y[loopIndex]; return total; }
Let Z be an array of 10 elements with Z[i]=1, for all i such that 0≤i≤9. The value returned by SimpleFunction(Z,10,2) is
What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.
#include <stdio.h> int main() { unsigned int x[4][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf("%u, %u, %u", x+3, *(x+3), *(x+2)+3); }
OnSite
1 Openings
FullTime
Posted 17 days ago