Zte mtk mmi interview questions (some of them)

Source: Internet
Author: User

① Sizeof usage. Take this test a lot. The usage of sizeof in Baidu search is mainly the calculation result. This is an empty question (a lot of questions)
Char * Ss = "0123456789 ";
Sizeof (SS) Result 4 ===" SS is a character pointer to a String constant
Sizeof (* ss) Result 1 = "* ss is the first character

Char ss [] = "0123456789 ";
Sizeof (SS) Result 11 ===" SS is an array, calculated to/0, so it is 10 + 1
Sizeof (* ss) Result 1 = "* ss is the first character

Char ss [100] = "0123456789 ";
The result of sizeof (SS) is 100 ===" SS indicates the size in the memory is 100 × 1
The strlen (SS) result is 10 ===" strlen is a function internally implemented before it is calculated in a loop until/0.

Int ss [100] = "0123456789 ";
Sizeof (SS) Result 400 => SS indicates that the memory size is 100 × 4
Strlen (SS) Error ===" the strlen parameter can only be char * and must end with ''/0''

② There is a blank programming question. You need to complete the functions of two strings. The general framework is almost written, and several judgment conditions need to be filled in.

③ There is a programming question that needs to complete the strcmp function. The existing functions in C cannot be used. There are many similar questions on the Internet.
Use custom functions to implement strcat, strcpy, strcmp, strlen, and strlwr functions.

1. strcat
Void MyCat (char * S1, char * S2)
{
While (* S1 ++ );
S1 --;
While (* S1 ++ = * S2 ++ );
}
2. strcpy
Void mycpy (char * S1, char * S2)
{
While (* S1 ++ = * S2 ++ );
}
3. strcmp
Int mycmp (char * S1, char * S2)
{
For (; * s = * t; s ++, t ++)
If (* s = 0) return 0;
Return * s-* t;
}
4. strlen
Int mylen (char * S1)
{
Char * P = S1;
While (* P ++ );
Return p-s-1;
}
5. strlwr
Char * strlwr (char * s)
{Unsigned char al;
Register char * dx, * si;
DX = SI = s;
While (Al = * si ++ )! = '/0 ')
{Al-= 'a ';
If (Al> 'Z'-'A') continue;
Si [-1] + = 'a'-'A ';
}
Return DX;
}

④ Showcategory of MTK programming (how to draw the left and right software in this screen function process. Remember the names of each function to set the Left and Right functions)
Void showcatemyscreen ()
{
S32 I;
// Initialize the screen
Entrynewscreen (scr_myapp_id, mmi_myapp_exit, null, null );
Gui_lock_double_buffer ();
Entry_full_screen ();
Clear_screen ();
// Initialize the menu framework
// Move_fixed_list ();
// Initialize the public data of a single item in the menu
 
// Registration key
Register_fixed_list_shortcut_handler ();
Register_fixed_list_keys ();
Register_fixed_list_highlight_handle (mmi_myapp_highlight_handler );
// Display menu
Fixed_list_goto_item_no_rerdraw (0 );
Show_fixed_list ();
 
// Display the Left and Right soft keys
Change_left_softkey (str_global_ OK, img_global_ OK );
Change_right_softkey (str_global_back, img_global_back );
Show_softkey (mmi_left_softkey );
Show_softkey (mmi_right_softkey );
 
Setleftkeyfunction (do_action, key_event_up );
Setrightsoftkeyfunction (gobackhistory, key_event_up );
 
Gui_unlock_double_buffer ();
Gui_blt_double_buffer (, UI_device_width-1, UI_device_height-1 );
}
4.1 u8 entrynewscreen (newscrnid, funcptr newexithandler, funcptr newentryhandler, void * peerbuf );

4.2 manual addition history
History currhistory;
Currhistory. scrnid = new_screenid;
Addhistory (currhistory );

4.3 boot initialization Function
Initializeall ()

⑤ Fill in the blank to see the modification effect on the MMOs as soon as possible after modifying one string.
2). Compilation Method:
Go to the. // plutommi/customer directory and run remakeresource. BAT to process the file.
After compilation, some Cust *. * files will be generated in the // plutommi // customer // custresource directory, and these files will be compiled when the code is compiled;
If the compilation fails, go to the build directory to view the log file res_gen.txt. The error message is displayed.

3) when we change resources and want to see the modification effect on the PC simulation, we also need to execute the above resource compilation command first,
Build Resources in the VC environment to see the effect.

6. How can I simulate a call by using the mocs? What is the necessary tool (catcher ).
Simulate dialing, calling, and text messages using Simulators

1. The menu tools à luanch catchers & NS options on the modems'
2. Select the. exe file of the catcherstool.
3. Click Start and inject in the MNS simulator box. Then, you can simulate many things and simulate calls and text messages based on your needs.

MTK highlighting Mechanism
1. Simple Analysis of highlight events on the MTK platform only involves applications at the MMI Layer

Involved functions:

Void sethilitehandler (2010itemid, funcptr hilitefuncptr );

Void registerhighlighthandler (void (* f) (s32 item_index ));

Void executecurrhilitehandler (s32 hiliteid );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.